Skip to content

Commit

Permalink
QFactoryLoader: load extraSearchPath first
Browse files Browse the repository at this point in the history
Since `QT_QPA_PLATFORM_PLUGIN_PATH` or `-platformpluginpath`
 specifies the path to platform plugins, `extraSearchPath`
 should be loaded first.

Pick-to: 6.8
Change-Id: I2e62fbf2021250ca864c669a7bbd7d56acd67d1e
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit 4575809)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
  • Loading branch information
kegechen authored and Qt Cherry-pick Bot committed Dec 23, 2024
1 parent 7b5dbe1 commit b610831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/corelib/plugin/qfactoryloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,18 +398,18 @@ void QFactoryLoader::update()
#ifdef QT_SHARED
Q_D(QFactoryLoader);

if (!d->extraSearchPath.isEmpty())
d->updateSinglePath(d->extraSearchPath);

const QStringList paths = QCoreApplication::libraryPaths();
for (const QString &pluginDir : paths) {
#ifdef Q_OS_ANDROID
QString path = pluginDir;
#else
QString path = pluginDir + d->suffix;
#endif

d->updateSinglePath(path);
}
if (!d->extraSearchPath.isEmpty())
d->updateSinglePath(d->extraSearchPath);
#else
Q_D(QFactoryLoader);
qCDebug(lcFactoryLoader) << "ignoring" << d->iid
Expand Down

0 comments on commit b610831

Please sign in to comment.