aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools/qmljsmodelmanager.h
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-06-30 11:56:28 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-06-30 15:25:43 +0200
commit329952f5ee792484bdb53141fcfb3dba15f05a60 (patch)
tree4881c73de7f071198f71dca869f0d6adbfc41614 /src/plugins/qmljstools/qmljsmodelmanager.h
parentb013637f22851b5c8914e43f4ade8a0e1bfefd25 (diff)
qmljs: fix race condition in defaultVContext
defaultVContext did call defaultProjectInfo which could be called only from the ui thread (as it did check the current project) Now update the defaultProjectInfo via signals, and lock on access making defaultProjectInfo threadsafe. Task-number: QTCREATORBUG-12556 Change-Id: Ibffeb59bbcef7120f08766160bb1e2ddc9af2922 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/qmljstools/qmljsmodelmanager.h')
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.h b/src/plugins/qmljstools/qmljsmodelmanager.h
index 2b8233a66f..efc8de8bb5 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.h
+++ b/src/plugins/qmljstools/qmljsmodelmanager.h
@@ -70,9 +70,10 @@ public:
protected:
QHash<QString, QmlJS::Language::Enum> languageForSuffix() const QTC_OVERRIDE;
void writeMessageInternal(const QString &msg) const QTC_OVERRIDE;
- ModelManagerInterface::ProjectInfo defaultProjectInfo() const QTC_OVERRIDE;
WorkingCopy workingCopyInternal() const QTC_OVERRIDE;
void addTaskInternal(QFuture<void> result, const QString &msg, const char *taskId) const QTC_OVERRIDE;
+private slots:
+ void updateDefaultProjectInfo();
private:
void loadDefaultQmlTypeDescriptions();
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);