From 72af6b7834f69cf6380b6df407c70914a3e7550d Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 8 Feb 2016 16:26:19 +0100 Subject: runAsync: Remove ResultType template parameter. It is now deduced from either the type of the QFutureInterface function argument, or the return type. Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee Reviewed-by: Tobias Hunger --- src/plugins/qmljseditor/qmljsfindreferences.cpp | 12 ++++-------- src/plugins/qmljseditor/qmljssemantichighlighter.cpp | 4 ++-- src/plugins/qmljseditor/qmltaskmanager.cpp | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) (limited to 'src/plugins/qmljseditor') diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp index a5c994265f..6c7ff6eb13 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.cpp +++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp @@ -891,10 +891,8 @@ void FindReferences::findUsages(const QString &fileName, quint32 offset) { ModelManagerInterface *modelManager = ModelManagerInterface::instance(); - QFuture result = Utils::runAsync( - &find_helper, modelManager->workingCopy(), - modelManager->snapshot(), fileName, offset, - QString()); + QFuture result = Utils::runAsync(&find_helper, modelManager->workingCopy(), + modelManager->snapshot(), fileName, offset, QString()); m_watcher.setFuture(result); } @@ -908,10 +906,8 @@ void FindReferences::renameUsages(const QString &fileName, quint32 offset, if (newName.isNull()) newName = QLatin1String(""); - QFuture result = Utils::runAsync( - &find_helper, modelManager->workingCopy(), - modelManager->snapshot(), fileName, offset, - newName); + QFuture result = Utils::runAsync(&find_helper, modelManager->workingCopy(), + modelManager->snapshot(), fileName, offset, newName); m_watcher.setFuture(result); } diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp index 493f2efeb2..0f2dea0442 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp @@ -545,8 +545,8 @@ void SemanticHighlighter::rerun(const QmlJSTools::SemanticInfo &semanticInfo) m_watcher.cancel(); m_startRevision = m_document->document()->revision(); - m_watcher.setFuture(Utils::runAsync(QThread::LowestPriority, - &SemanticHighlighter::run, this, semanticInfo)); + m_watcher.setFuture(Utils::runAsync(QThread::LowestPriority, + &SemanticHighlighter::run, this, semanticInfo)); } void SemanticHighlighter::cancel() diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp index 252dbf4391..f0e28ad6d3 100644 --- a/src/plugins/qmljseditor/qmltaskmanager.cpp +++ b/src/plugins/qmljseditor/qmltaskmanager.cpp @@ -152,7 +152,7 @@ void QmlTaskManager::updateMessagesNow(bool updateSemantic) // process them QFuture future = - Utils::runAsync( + Utils::runAsync( &collectMessages, modelManager->newestSnapshot(), modelManager->projectInfos(), modelManager->defaultVContext(Dialect::AnyLanguage), updateSemantic); m_messageCollector.setFuture(future); -- cgit v1.2.1