summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-03-01 17:15:12 +0100
committerAapo Keskimolo <aapo.keskimolo@qt.io>2019-03-06 12:37:41 +0000
commitc911349b8bdcc7f798091eb6acd20395883b2000 (patch)
tree12270430040e73abb5f7b6091bb7887ab9973a1f /tools
parent783ec60774a565f3a16c25af076b720de0e6acbd (diff)
Fix re-dumping of composite types
Just like with 'normal' types, we don't want to include composite types that were actually part of depending imports. So we need to remove them from the list. This fixes an issue with QtQuick.Controls style plugins, were so far types from QtQuick.Controls 2 imports were re-dumped. Change-Id: Ib099ae9cfba35218cab852d4d260369c2a652727 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 06dd6abe2b..67ffd5a555 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -1183,8 +1183,8 @@ int main(int argc, char *argv[])
// find all QMetaObjects reachable from the builtin module
QSet<const QMetaObject *> uncreatableMetas;
QSet<const QMetaObject *> singletonMetas;
- QMap<QString, QSet<QQmlType>> compositeTypes;
- QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, compositeTypes);
+ QMap<QString, QSet<QQmlType>> defaultCompositeTypes;
+ QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, defaultCompositeTypes);
QList<QQmlType> defaultTypes = QQmlMetaType::qmlTypes();
// add some otherwise unreachable QMetaObjects
@@ -1195,6 +1195,9 @@ int main(int argc, char *argv[])
// this will hold the meta objects we want to dump information of
QSet<const QMetaObject *> metas;
+ // composite types we want to dump information of
+ QMap<QString, QSet<QQmlType>> compositeTypes;
+
if (action == Builtins) {
for (const QMetaObject *m : qAsConst(defaultReachable)) {
if (m->className() == QLatin1String("Qt")) {
@@ -1271,6 +1274,14 @@ int main(int argc, char *argv[])
QSet<const QMetaObject *> candidates = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, compositeTypes, defaultTypes);
candidates.subtract(defaultReachable);
+ for (QString iter: compositeTypes.keys()) {
+ if (defaultCompositeTypes.contains(iter)) {
+ QSet<QQmlType> compositeTypesByName = compositeTypes.value(iter);
+ compositeTypesByName.subtract(defaultCompositeTypes.value(iter));
+ compositeTypes[iter] = compositeTypesByName;
+ }
+ }
+
// Also eliminate meta objects with the same classname.
// This is required because extended objects seem not to share
// a single meta object instance.