QmlJS: Store plugin metatypes in LibraryInfo. Rework type loading.

This commit is contained in:
Christian Kamm
2010-06-09 14:27:30 +02:00
parent 206c190e7f
commit e307bc2506
8 changed files with 204 additions and 136 deletions

View File

@@ -37,6 +37,7 @@
#include <QFuture>
#include <QFutureSynchronizer>
#include <QMutex>
#include <QProcess>
namespace Core {
class ICore;
@@ -74,6 +75,7 @@ private Q_SLOTS:
// this should be executed in the GUI thread.
void onDocumentUpdated(QmlJS::Document::Ptr doc);
void onLibraryInfoUpdated(const QString &path, const QmlJS::LibraryInfo &info);
void qmlPluginTypeDumpDone(int exitCode);
protected:
struct WorkingCopy
@@ -94,6 +96,7 @@ protected:
bool emitDocChangedOnDisk);
void loadQmlTypeDescriptions();
void loadQmlPluginTypes(const QString &pluginPath);
private:
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
@@ -103,6 +106,7 @@ private:
QmlJS::Snapshot _snapshot;
QStringList m_projectImportPaths;
QStringList m_defaultImportPaths;
QHash<QProcess *, QString> m_runningQmldumps;
QFutureSynchronizer<void> m_synchronizer;
};