forked from qt-creator/qt-creator
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:
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user