aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlplugindump/main.cpp')
-rw-r--r--tools/qmlplugindump/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 89af0905d5..000af0a1d8 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -182,6 +182,20 @@ QByteArray convertToId(const QMetaObject *mo)
return className;
}
+
+// Collect all metaobjects for types registered with qmlRegisterType() without parameters
+void collectReachableMetaObjectsWithoutQmlName( QSet<const QMetaObject *>& metas ) {
+ foreach (const QQmlType *ty, QQmlMetaType::qmlAllTypes()) {
+ if ( ! metas.contains(ty->metaObject()) ) {
+ if (!ty->isComposite()) {
+ collectReachableMetaObjects(ty, &metas);
+ } else {
+ qmlTypesByCompositeName[ty->elementName()] = ty;
+ }
+ }
+ }
+}
+
QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
QSet<const QMetaObject *> &noncreatables,
QSet<const QMetaObject *> &singletons,
@@ -298,6 +312,8 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
}
}
+ collectReachableMetaObjectsWithoutQmlName(metas);
+
return metas;
}