QmlJSModelManager: Use Utils::runAsync instead of QtConcurrent::run

To get rid of the shared thread pool (and to use the API with the less
ugly implementation).

Change-Id: Ia93977b8b394aff8e410d6d81446c23e32b7aed5
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Eike Ziller
2016-01-22 11:17:29 +01:00
parent a30c1adc96
commit 265fa13bdb

View File

@@ -319,10 +319,10 @@ QFuture<void> ModelManagerInterface::refreshSourceFiles(const QStringList &sourc
if (sourceFiles.isEmpty()) if (sourceFiles.isEmpty())
return QFuture<void>(); return QFuture<void>();
QFuture<void> result = QtConcurrent::run(&ModelManagerInterface::parse, QFuture<void> result = Utils::runAsync<void>(&ModelManagerInterface::parse,
workingCopyInternal(), sourceFiles, workingCopyInternal(), sourceFiles,
this, Dialect(Dialect::Qml), this, Dialect(Dialect::Qml),
emitDocumentOnDiskChanged); emitDocumentOnDiskChanged);
cleanupFutures(); cleanupFutures();
m_futures.append(result); m_futures.append(result);