Make anitest and pictest load the built plugins

addLibraryPath() is a no-op if the path being added is already present,
which is the case for PLUGIN_DIR here (it is set to the test's own
directory). The docs for addLibraryPath() say this directory is last in
the default list.
This commit is contained in:
James Gilbertson
2026-11-05 09:10:02 -08:00
parent fb7294fbf2
commit 74a1fc7780
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -31,6 +31,8 @@ class AniTests : public QObject
private Q_SLOTS:
void initTestCase()
{
// addLibraryPath is a no-op if the path added is already present in the list
QCoreApplication::removeLibraryPath(QStringLiteral(PLUGIN_DIR));
QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR));
}
+2
View File
@@ -59,6 +59,8 @@ private:
private Q_SLOTS:
void initTestCase()
{
// addLibraryPath is a no-op if the path added is already present in the list
QCoreApplication::removeLibraryPath(QStringLiteral(PLUGIN_DIR));
QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR));
}