forked from qt-creator/qt-creator
FunctionDeclDefLinkFinder: Ensure the old futures are synchronized
Change-Id: I68b271f85d2bb319230529d4b0b074c05c12ba4c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/actionmanager/command.h>
|
#include <coreplugin/actionmanager/command.h>
|
||||||
#include <texteditor/refactoroverlay.h>
|
|
||||||
#include <texteditor/texteditorconstants.h>
|
|
||||||
|
|
||||||
#include <cplusplus/ASTPath.h>
|
#include <cplusplus/ASTPath.h>
|
||||||
#include <cplusplus/CppRewriter.h>
|
#include <cplusplus/CppRewriter.h>
|
||||||
@@ -23,7 +21,13 @@
|
|||||||
#include <cplusplus/Overview.h>
|
#include <cplusplus/Overview.h>
|
||||||
#include <cplusplus/TypeOfExpression.h>
|
#include <cplusplus/TypeOfExpression.h>
|
||||||
|
|
||||||
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
|
#include <texteditor/refactoroverlay.h>
|
||||||
|
#include <texteditor/texteditorconstants.h>
|
||||||
|
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
|
#include <utils/futuresynchronizer.h>
|
||||||
#include <utils/proxyaction.h>
|
#include <utils/proxyaction.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/textutils.h>
|
#include <utils/textutils.h>
|
||||||
@@ -235,6 +239,7 @@ void FunctionDeclDefLinkFinder::startFindLinkAt(
|
|||||||
m_watcher.reset(new QFutureWatcher<std::shared_ptr<FunctionDeclDefLink> >());
|
m_watcher.reset(new QFutureWatcher<std::shared_ptr<FunctionDeclDefLink> >());
|
||||||
connect(m_watcher.get(), &QFutureWatcherBase::finished, this, &FunctionDeclDefLinkFinder::onFutureDone);
|
connect(m_watcher.get(), &QFutureWatcherBase::finished, this, &FunctionDeclDefLinkFinder::onFutureDone);
|
||||||
m_watcher->setFuture(Utils::asyncRun(findLinkHelper, result, refactoringChanges));
|
m_watcher->setFuture(Utils::asyncRun(findLinkHelper, result, refactoringChanges));
|
||||||
|
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_watcher->future());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FunctionDeclDefLink::isValid() const
|
bool FunctionDeclDefLink::isValid() const
|
||||||
|
|||||||
Reference in New Issue
Block a user