summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolstestcase.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-07-07 15:02:14 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-07-10 14:04:07 +0000
commit442bdbded2b2268efcb3be1a969d432533023366 (patch)
tree9bda03fd90c90de0385bde77d25d32f15cc9856b /src/plugins/cpptools/cpptoolstestcase.h
parent91c497b1aebaf4b24ac1e5b884940820c6a0a88c (diff)
downloadqt-creator-442bdbded2b2268efcb3be1a969d432533023366.tar.gz
CppTools: Avoid unnecessary blocking of main thread
Among others, BaseEditorDocumentParser::projectPart() was a blocking operation in case the parser was running. This led to noticeable GUI freezes for the ClangCodeModel since the function was called from the main thread. Rework *EditorDocumentParser to clearly separate the configuration data (input) from the actual object state. Querying/setting configuration or (last) state does not block anymore. update() is supposed to get the necessary configuration and the last state at the beginning and to set the new state at end. Change-Id: Ib4b534fa6ff373c3059826726b3f10ece95acc21 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolstestcase.h')
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolstestcase.h b/src/plugins/cpptools/cpptoolstestcase.h
index 5a95952365..d35e93c3b4 100644
--- a/src/plugins/cpptools/cpptoolstestcase.h
+++ b/src/plugins/cpptools/cpptoolstestcase.h
@@ -95,6 +95,8 @@ public:
static CPlusPlus::Snapshot globalSnapshot();
static bool garbageCollectGlobalSnapshot();
+ static bool waitForProcessedEditorDocument(const QString &filePath, int timeOutInMs = 5000);
+
enum { defaultTimeOutInMs = 30 * 1000 /*= 30 secs*/ };
static bool waitUntilCppModelManagerIsAwareOf(
ProjectExplorer::Project *project,