From c13c37f9f414e253a777ee8a1d38de1ac8679b52 Mon Sep 17 00:00:00 2001
From: Christian Stenger <christian.stenger@theqtcompany.com>
Date: Thu, 16 Apr 2015 15:07:56 +0200
Subject: [PATCH] Fix plugin unit test

Since d43a36c8167a37903f70b49b67ec39efa0ba086e the code parser could
have been internally triggered already while still evaluating the
project. This made the parser trigger a parsingFinished() already for
a parse where not the full project had been available inside the
code model which made the plugin unit test fail.

Change-Id: I6cc787c24205cb82c6c2636f79bd0acc5c778c64
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
---
 plugins/autotest/testcodeparser.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp
index 8c0b7b43d7b..004f733fbda 100644
--- a/plugins/autotest/testcodeparser.cpp
+++ b/plugins/autotest/testcodeparser.cpp
@@ -547,7 +547,10 @@ void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project)
 {
     if (project != currentProject())
         return;
-    updateTestTree();
+    if (!m_parserEnabled || m_parserState == Disabled)
+        m_fullUpdatePostponed = true;
+    else
+        emitUpdateTestTree();
 }
 
 void TestCodeParser::removeFiles(const QStringList &files)
-- 
GitLab