forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user