diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-02-21 11:58:16 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-03-19 13:37:46 +0000 |
commit | 08d1274ccc0e9b116626afad60afaa970fe2fbbf (patch) | |
tree | e6fc80b45812c84f47bb72018b0e8362e3b31073 /src/plugins/clangcodemodel/clangfollowsymbol.h | |
parent | d471006d8136cd6f99f668d5a55e4f7a7483737e (diff) |
CppTools: Remove processEvents call from follow symbol
processEvents is a bad way of dealing with asynchronous
requests. Use QFutureWatcher for that purpose.
Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangfollowsymbol.h')
-rw-r--r-- | src/plugins/clangcodemodel/clangfollowsymbol.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/clangfollowsymbol.h b/src/plugins/clangcodemodel/clangfollowsymbol.h index 8c9da83592..dd7abb38fc 100644 --- a/src/plugins/clangcodemodel/clangfollowsymbol.h +++ b/src/plugins/clangcodemodel/clangfollowsymbol.h @@ -26,6 +26,9 @@ #pragma once #include <cpptools/followsymbolinterface.h> +#include <cpptools/cppsymbolinfo.h> + +#include <QFutureWatcher> namespace ClangCodeModel { namespace Internal { @@ -33,12 +36,16 @@ namespace Internal { class ClangFollowSymbol : public CppTools::FollowSymbolInterface { public: - Link findLink(const CppTools::CursorInEditor &data, + void findLink(const CppTools::CursorInEditor &data, + ::Utils::ProcessLinkCallback &&processLinkCallback, bool resolveTarget, const CPlusPlus::Snapshot &snapshot, const CPlusPlus::Document::Ptr &documentFromSemanticInfo, CppTools::SymbolFinder *symbolFinder, bool inNextSplit) override; +private: + using FutureSymbolWatcher = QFutureWatcher<CppTools::SymbolInfo>; + FutureSymbolWatcher m_watcher; }; } // namespace Internal |