CppEditor/CppTools: Tests: Fix potential race condition

...when updating the code model.

Change-Id: Ifc55b7d0bb795b9cfd72465990991bc2cc907846
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-12-11 14:10:09 +01:00
committed by Erik Verbruggen
parent dad0140134
commit 9b41023b68
10 changed files with 67 additions and 90 deletions

View File

@@ -103,10 +103,14 @@ ModelManagerTestHelper::Project *ModelManagerTestHelper::createProject(const QSt
return tp;
}
void ModelManagerTestHelper::resetRefreshedSourceFiles()
{
m_lastRefreshedSourceFiles.clear();
m_refreshHappened = false;
}
QStringList ModelManagerTestHelper::waitForRefreshedSourceFiles()
{
m_refreshHappened = false;
while (!m_refreshHappened)
QCoreApplication::processEvents();