From ad49e64ff00259fc1967768695dd5e5a0ee65c96 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 27 Jul 2016 14:48:42 +0200 Subject: CppTools: Cancel parsing if editor is closed The m_parserFuture.cancel() in ~BuiltinEditorDocumentProcessor() did not cancel anything. Thus, closing a document while the parser was running led to a blocking UI thread. Now it cancels at the next include directive it encounters. Change-Id: I092fddbbd747e0bc95265b6e9b4fcc26b3f76cb3 Reviewed-by: Friedemann Kleint Reviewed-by: Tim Jenssen --- src/plugins/cpptools/baseeditordocumentprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/cpptools/baseeditordocumentprocessor.cpp') diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.cpp b/src/plugins/cpptools/baseeditordocumentprocessor.cpp index f32d79ed77..82aa058b90 100644 --- a/src/plugins/cpptools/baseeditordocumentprocessor.cpp +++ b/src/plugins/cpptools/baseeditordocumentprocessor.cpp @@ -77,7 +77,7 @@ void BaseEditorDocumentProcessor::runParser(QFutureInterface &future, return; } - parser->update(workingCopy); + parser->update(future, workingCopy); CppToolsBridge::finishedRefreshingSourceFiles({parser->filePath()}); future.setProgressValue(1); -- cgit v1.2.1