aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsmodelmanagerinterface.h
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2016-01-22 11:04:52 +0100
committerEike Ziller <[email protected]>2016-01-22 13:28:55 +0000
commita30c1adc9678e90e50a80836ac74600cef48d04e (patch)
treef67b67722763e70ca9e9f342626c38b2b59ca9db /src/libs/qmljs/qmljsmodelmanagerinterface.h
parent677effda786d7d6a60b34466b6f442fb71b66999 (diff)
QmlJSModelManager: Cleanup uses of QFuture
- Use simple list instead of QFutureSynchronizer (no feature of that was used) - Avoid duplicate code cleaning up the current list of running futures - Clean list of running futures after waiting for them all to finish Change-Id: Ia13ee25ab7835fc4f4970d23d20b16cfe6bf6dfb Reviewed-by: Marco Benelli <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsmodelmanagerinterface.h')
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h
index d071998596b..690b178ec8a 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.h
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h
@@ -36,7 +36,6 @@
#include <utils/environment.h>
#include <QFuture>
-#include <QFutureSynchronizer>
#include <QHash>
#include <QObject>
#include <QPointer>
@@ -250,6 +249,8 @@ protected:
void setDefaultProject(const ProjectInfo &pInfo, ProjectExplorer::Project *p);
private:
+ void cleanupFutures();
+
mutable QMutex m_mutex;
QmlJS::Snapshot m_validSnapshot;
QmlJS::Snapshot m_newestSnapshot;
@@ -278,7 +279,7 @@ private:
PluginDumper *m_pluginDumper;
- QFutureSynchronizer<void> m_synchronizer;
+ QList<QFuture<void>> m_futures;
bool m_indexerEnabled;
};