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.
This commit is contained in:
Christian Kamm
2011-02-10 14:53:57 +01:00
parent 13f9135827
commit 187ae1e94a
9 changed files with 116 additions and 140 deletions

View File

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