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 206c190e7f)
This commit is contained in:
Christian Kamm
2010-06-09 14:24:23 +02:00
parent 24a736b602
commit 033def369c

View File

@@ -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);
}