aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorSebastian Lösch <Sebastian.Loesch@governikus.de>2016-03-24 12:09:31 +0100
committerSebastian Lösch <Sebastian.Loesch@governikus.com>2016-04-11 14:10:54 +0000
commit392c7b99348e2a96ef11adb5712095fbd13fb780 (patch)
tree725983522306909efc333e7a710c80723a10612e /src/qml/qml
parent07b7c6efaa75b79b0625de81dc8f7e6ca264e16e (diff)
Instantiate static Qml plugins declaring QQmlExtensionInterface only
When instantiating static plugins no check is done whether the QQmlExtensionInterface is declared. Therefore all user plugins are instantiated in the Qml thread, which may cause problems. Task-number: QTBUG-52012 Change-Id: Ia91ec5ec7b2a9721bd11e3648cdc161855b4454e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlimport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index d538199520..9fc01c8e35 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -850,8 +850,8 @@ bool QQmlImportsPrivate::populatePluginPairVector(QVector<StaticPluginPair> &res
// To avoid traversing all static plugins for all imports, we cut down
// the list the first time called to only contain QML plugins:
foreach (const QStaticPlugin &plugin, QPluginLoader::staticPlugins()) {
- if (qobject_cast<QQmlExtensionPlugin *>(plugin.instance()))
- plugins.append(plugin);
+ if (plugin.metaData().value(QStringLiteral("IID")).toString() == QLatin1String(QQmlExtensionInterface_iid))
+ plugins.append(plugin);
}
}