forked from qt-creator/qt-creator
CppEditor: Fix race condition in test
Opening an editor starts a new parser, so we must do that before we wait for the parsing to finish. Change-Id: Iee9da8da1fb60bf496a093d8efd878101d91f53f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -92,15 +92,15 @@ public:
|
||||
filePaths << absoluteFilePath;
|
||||
}
|
||||
|
||||
// Update Code Model
|
||||
QVERIFY(parseFiles(filePaths));
|
||||
|
||||
// Open Editor
|
||||
const QString fileName = temporaryDir.path() + QLatin1String("/file1.h");
|
||||
CppEditor *editor;
|
||||
QVERIFY(openCppEditor(fileName, &editor));
|
||||
closeEditorAtEndOfTestCase(editor);
|
||||
|
||||
// Update Code Model
|
||||
QVERIFY(parseFiles(filePaths));
|
||||
|
||||
// Test model
|
||||
CppIncludeHierarchyModel model;
|
||||
model.buildHierarchy(editor->document()->filePath().toString());
|
||||
|
||||
Reference in New Issue
Block a user