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.

Change-Id: I2e62fbf2021250ca864c669a7bbd7d56acd67d1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4575809)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b610831)
  • Loading branch information
kegechen authored and Qt Cherry-pick Bot committed Dec 23, 2024
1 parent b2dcce1 commit b0d788f
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 @@ -394,18 +394,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 b0d788f

Please sign in to comment.