summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-12-08 14:15:58 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-08 14:22:57 +0100
commit8c82a7bade2bef82b3cf3e38ebef2c0c4777e5fa (patch)
treee405ac21d6f2e6f99510132443b5856bba1c1321 /tools
parentfdd14a1a10a0a2f42015b30071771bd95215cc1a (diff)
qmlplugindump: Fix dumping of extended QGraphicsWidget.
Change-Id: Id574b4ee98f7d985ef06619956b2c02cac68b553 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index c9f6cbe6c1..79c6fce3dd 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -76,14 +76,15 @@ bool verbose = false;
QString currentProperty;
QString inObjectInstantiation;
-void collectReachableMetaObjects(const QMetaObject *meta, QSet<const QMetaObject *> *metas)
+void collectReachableMetaObjects(const QMetaObject *meta, QSet<const QMetaObject *> *metas, bool extended = false)
{
if (! meta || metas->contains(meta))
return;
- // dynamic meta objects break things badly, so just ignore them
+ // dynamic meta objects can break things badly (like QDeclarative1VisualDataModelParts)
+ // but extended types are usually fine (like QDeclarative1GraphicsWidget)
const QMetaObjectPrivate *mop = reinterpret_cast<const QMetaObjectPrivate *>(meta->d.data);
- if (!(mop->flags & DynamicMetaObject))
+ if (extended || !(mop->flags & DynamicMetaObject))
metas->insert(meta);
collectReachableMetaObjects(meta->superClass(), metas);
@@ -118,7 +119,7 @@ void collectReachableMetaObjects(QObject *object, QSet<const QMetaObject *> *met
void collectReachableMetaObjects(const QDeclarativeType *ty, QSet<const QMetaObject *> *metas)
{
- collectReachableMetaObjects(ty->metaObject(), metas);
+ collectReachableMetaObjects(ty->metaObject(), metas, ty->isExtendedType());
if (ty->attachedPropertiesType())
collectReachableMetaObjects(ty->attachedPropertiesType(), metas);
}