aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools/qmljsplugindumper.cpp
diff options
context:
space:
mode:
authorChristian Kamm <[email protected]>2011-02-10 14:53:57 +0100
committerChristian Kamm <[email protected]>2011-02-10 17:04:22 +0100
commit187ae1e94a1b151c3d82cd47c51b73815df08d49 (patch)
tree4e5e6013e56bd8b690b5f74c1c694c4f287c5e98 /src/plugins/qmljstools/qmljsplugindumper.cpp
parent13f9135827b43a1ffd8bcbf3699641a3fedbd7dd (diff)
QmlJS: Rework FakeMetaObjects to no longer contain pointers.
Having a duplicate prototype chain - once in FakeMetaObjects and once in QmlObjectValues was unnecessary. Now FMOs don't contain references which may allow other simplifications.
Diffstat (limited to 'src/plugins/qmljstools/qmljsplugindumper.cpp')
-rw-r--r--src/plugins/qmljstools/qmljsplugindumper.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/qmljstools/qmljsplugindumper.cpp b/src/plugins/qmljstools/qmljsplugindumper.cpp
index 7ab0d9bcb23..68d70a80869 100644
--- a/src/plugins/qmljstools/qmljsplugindumper.cpp
+++ b/src/plugins/qmljstools/qmljsplugindumper.cpp
@@ -139,16 +139,11 @@ static QString qmldumpFailedMessage(const QString &error)
static QList<FakeMetaObject::ConstPtr> parseHelper(const QByteArray &qmlTypeDescriptions, QString *error)
{
QList<FakeMetaObject::ConstPtr> ret;
- QHash<QString, FakeMetaObject::Ptr> newObjects;
+ QHash<QString, FakeMetaObject::ConstPtr> newObjects;
*error = Interpreter::CppQmlTypesLoader::parseQmlTypeDescriptions(qmlTypeDescriptions, &newObjects);
if (error->isEmpty()) {
- // convert from QList<T *> to QList<const T *>
- QHashIterator<QString, FakeMetaObject::Ptr> it(newObjects);
- while (it.hasNext()) {
- it.next();
- ret.append(it.value());
- }
+ ret = newObjects.values();
}
return ret;
}