Qml/C++: Fix performance problem with type extraction.

By moving the offending code into a background thread.

Reviewed-by: Erik Verbruggen
This commit is contained in:
Christian Kamm
2011-01-06 10:01:45 +01:00
parent c7070526ec
commit 283a3d32cd
9 changed files with 86 additions and 29 deletions

View File

@@ -110,6 +110,8 @@ public:
Table _elements;
};
typedef QHash<QString, QList<LanguageUtils::FakeMetaObject::ConstPtr> > CppQmlTypeHash;
public:
ModelManagerInterface(QObject *parent = 0);
virtual ~ModelManagerInterface();
@@ -132,6 +134,8 @@ public:
virtual void loadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri) = 0;
virtual CppQmlTypeHash cppQmlTypes() const = 0;
signals:
void documentUpdated(QmlJS::Document::Ptr doc);
void documentChangedOnDisk(QmlJS::Document::Ptr doc);