AutoTest: Minor fix for initial test scan

If parsing the project is not finished we get an empty list of
files to be scanned.
Just trigger another full scan for such a case.

Change-Id: I84b275f76bc98c8f0ef544fc27d30ebd6f8b43d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Christian Stenger
2016-07-28 11:16:22 +02:00
parent d1a5d164b1
commit 18ac6b8be1

View File

@@ -318,8 +318,13 @@ void TestCodeParser::scanForTests(const QStringList &fileList)
QStringList list;
if (isFullParse) {
list = ProjectExplorer::SessionManager::startupProject()->files(ProjectExplorer::Project::SourceFiles);
if (list.isEmpty())
if (list.isEmpty()) {
// at least project file should be there, but might happen if parsing current project
// takes too long, especially when opening sessions holding multiple projects
qCDebug(LOG) << "File list empty (FullParse) - trying again in a sec";
emitUpdateTestTree();
return;
}
qCDebug(LOG) << "setting state to FullParse (scanForTests)";
m_parserState = FullParse;
} else {