forked from qt-creator/qt-creator
QmlJsEditor: Avoid QtConcurrent::run
Change-Id: Id95acdeb2be21721950c6926494a5d2e5a00d8bb Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -891,7 +891,7 @@ void FindReferences::findUsages(const QString &fileName, quint32 offset)
|
|||||||
{
|
{
|
||||||
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
|
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
|
||||||
|
|
||||||
QFuture<Usage> result = QtConcurrent::run(
|
QFuture<Usage> result = Utils::runAsync<Usage>(
|
||||||
&find_helper, modelManager->workingCopy(),
|
&find_helper, modelManager->workingCopy(),
|
||||||
modelManager->snapshot(), fileName, offset,
|
modelManager->snapshot(), fileName, offset,
|
||||||
QString());
|
QString());
|
||||||
@@ -908,7 +908,7 @@ void FindReferences::renameUsages(const QString &fileName, quint32 offset,
|
|||||||
if (newName.isNull())
|
if (newName.isNull())
|
||||||
newName = QLatin1String("");
|
newName = QLatin1String("");
|
||||||
|
|
||||||
QFuture<Usage> result = QtConcurrent::run(
|
QFuture<Usage> result = Utils::runAsync<Usage>(
|
||||||
&find_helper, modelManager->workingCopy(),
|
&find_helper, modelManager->workingCopy(),
|
||||||
modelManager->snapshot(), fileName, offset,
|
modelManager->snapshot(), fileName, offset,
|
||||||
newName);
|
newName);
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ void QmlTaskManager::updateMessagesNow(bool updateSemantic)
|
|||||||
|
|
||||||
// process them
|
// process them
|
||||||
QFuture<FileErrorMessages> future =
|
QFuture<FileErrorMessages> future =
|
||||||
QtConcurrent::run<FileErrorMessages>(
|
Utils::runAsync<FileErrorMessages>(
|
||||||
&collectMessages, modelManager->newestSnapshot(), modelManager->projectInfos(),
|
&collectMessages, modelManager->newestSnapshot(), modelManager->projectInfos(),
|
||||||
modelManager->defaultVContext(Dialect::AnyLanguage), updateSemantic);
|
modelManager->defaultVContext(Dialect::AnyLanguage), updateSemantic);
|
||||||
m_messageCollector.setFuture(future);
|
m_messageCollector.setFuture(future);
|
||||||
|
|||||||
Reference in New Issue
Block a user