summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolstestcase.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-05-12 12:04:13 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-05-17 13:40:34 +0000
commit32653e1a7b1e1f5266069aecc5fa9952508f8020 (patch)
treecfafe5bdfa174acde8184f631aa083966e7af4e2 /src/plugins/cpptools/cpptoolstestcase.cpp
parentc79a4fab6e6ce66fa7ca3fe128668a7393ea39dd (diff)
downloadqt-creator-32653e1a7b1e1f5266069aecc5fa9952508f8020.tar.gz
CppTools: Fix possible crash when testing
Change-Id: I9ade8c861c44329376c8f1dcc9506561b7689de5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolstestcase.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp
index 817c78993c..d72101d802 100644
--- a/src/plugins/cpptools/cpptoolstestcase.cpp
+++ b/src/plugins/cpptools/cpptoolstestcase.cpp
@@ -234,8 +234,9 @@ bool TestCase::waitUntilProjectIsFullyOpened(Project *project, int timeOutInMs)
return QTest::qWaitFor(
[project]() {
- return !SessionManager::startupBuildSystem()->isParsing()
- && CppModelManager::instance()->projectInfo(project).isValid();
+ return SessionManager::startupBuildSystem()
+ && !SessionManager::startupBuildSystem()->isParsing()
+ && CppModelManager::instance()->projectInfo(project).isValid();
},
timeOutInMs);
}