QFactoryLoader: load extraSearchPath first
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 457580936ddebc73e8a24fc8af0d342084b3a0b5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b6108318c2a7e79c297e6fa7cdc9f6de88b6efa9)
This commit is contained in:
parent
b2dcce10a2
commit
b0d788f7a9
@ -394,6 +394,9 @@ void QFactoryLoader::update()
|
|||||||
#ifdef QT_SHARED
|
#ifdef QT_SHARED
|
||||||
Q_D(QFactoryLoader);
|
Q_D(QFactoryLoader);
|
||||||
|
|
||||||
|
if (!d->extraSearchPath.isEmpty())
|
||||||
|
d->updateSinglePath(d->extraSearchPath);
|
||||||
|
|
||||||
const QStringList paths = QCoreApplication::libraryPaths();
|
const QStringList paths = QCoreApplication::libraryPaths();
|
||||||
for (const QString &pluginDir : paths) {
|
for (const QString &pluginDir : paths) {
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
@ -401,11 +404,8 @@ void QFactoryLoader::update()
|
|||||||
#else
|
#else
|
||||||
QString path = pluginDir + d->suffix;
|
QString path = pluginDir + d->suffix;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
d->updateSinglePath(path);
|
d->updateSinglePath(path);
|
||||||
}
|
}
|
||||||
if (!d->extraSearchPath.isEmpty())
|
|
||||||
d->updateSinglePath(d->extraSearchPath);
|
|
||||||
#else
|
#else
|
||||||
Q_D(QFactoryLoader);
|
Q_D(QFactoryLoader);
|
||||||
qCDebug(lcFactoryLoader) << "ignoring" << d->iid
|
qCDebug(lcFactoryLoader) << "ignoring" << d->iid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user