diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-04-30 11:58:20 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-06-03 08:59:17 +0000 |
commit | e661a9c19ec4a0acee696df637db0d5c510b5bd8 (patch) | |
tree | 25a636027cb709031d0ed41b41a062c8a2233821 /src/plugins/cppeditor/cppquickfixassistant.cpp | |
parent | 7050f78b8d4df3af3a7fe723667968e214fd1908 (diff) | |
download | qt-creator-e661a9c19ec4a0acee696df637db0d5c510b5bd8.tar.gz |
CodeAssist: Support asynchronous processing without threads
This is required for the CodemodelBackendIPC integration in the
ClangCodeModelPlugin. Since the heavy calculation happens in a separate
process, we only need to send appropriate requests and receive results
for a working completion. However, the CodeAssist API does not fit here
since it only provides means of caculating the results in the main
thread or a worker thread. We can't use the worker thread approach since
that would lead to threading issues regarding QLocalSocket in
CodemodelBackendIPC.
IAssistProcessor::setAsyncProposalAvailable() will hand the results
back to CodeAssist in order to display them.
Change-Id: I496192560fb406ec40fa8bcb7904f7a03d2eef50
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixassistant.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppquickfixassistant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppquickfixassistant.cpp b/src/plugins/cppeditor/cppquickfixassistant.cpp index 87f436639d..dfb03b38c5 100644 --- a/src/plugins/cppeditor/cppquickfixassistant.cpp +++ b/src/plugins/cppeditor/cppquickfixassistant.cpp @@ -51,9 +51,9 @@ namespace Internal { // ------------------------- // CppQuickFixAssistProvider // ------------------------- -bool CppQuickFixAssistProvider::isAsynchronous() const +IAssistProvider::RunType CppQuickFixAssistProvider::runType() const { - return false; + return Synchronous; } bool CppQuickFixAssistProvider::supportsEditor(Core::Id editorId) const |