summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-06-09 14:24:23 +0200
committercon <qtc-committer@nokia.com>2010-07-28 17:57:12 +0200
commitc2602e9ae4f94485a275d684d91f0cf1e0d801d2 (patch)
treeb81fe266bb20525848ba40eeacda87d22aa98374
parent9287fc0f18aecbe4dccdcda72d99cba785f42e88 (diff)
downloadqt-creator-c2602e9ae4f94485a275d684d91f0cf1e0d801d2.tar.gz
QmlJS: Make qmldump not dump open/dynamic meta objects.
They would need special treatment, like the Qml extended objects. The issue is they lead to two meta objects with the same classname and the dumper can't handle that. (cherry picked from commit 206c190e7ff3e7dfd59341fa99207c0d1bff0dd7) (cherry picked from commit 033def369cb0bda5ce134b7dabe97465596ed3e1)
-rw-r--r--src/tools/qml/qmldump/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/qml/qmldump/main.cpp b/src/tools/qml/qmldump/main.cpp
index 525ccd8335..4dcdb0156c 100644
--- a/src/tools/qml/qmldump/main.cpp
+++ b/src/tools/qml/qmldump/main.cpp
@@ -9,7 +9,10 @@
#include <QDebug>
#include <iostream>
#include <QtDeclarative>
+#include <QtCore/private/qobject_p.h>
+#include <QtCore/private/qmetaobject_p.h>
#include <QtDeclarative/private/qdeclarativemetatype_p.h>
+#include <QtDeclarative/private/qdeclarativeopenmetaobject_p.h>
#include <QtDeclarative/QDeclarativeView>
static QHash<QByteArray, const QDeclarativeType *> qmlTypeByCppName;
@@ -46,7 +49,11 @@ void processMetaObject(const QMetaObject *meta, QSet<const QMetaObject *> *metas
if (! meta || metas->contains(meta))
return;
- metas->insert(meta);
+ // dynamic meta objects break things badly
+ const QMetaObjectPrivate *mop = reinterpret_cast<const QMetaObjectPrivate *>(meta->d.data);
+ if (!(mop->flags & DynamicMetaObject))
+ metas->insert(meta);
+
processMetaObject(meta->superClass(), metas);
}