From e661a9c19ec4a0acee696df637db0d5c510b5bd8 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 30 Apr 2015 11:58:20 +0200 Subject: 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 --- src/plugins/cppeditor/cppquickfixassistant.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/cppeditor/cppquickfixassistant.cpp') 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 -- cgit v1.2.1