Autotest: Don't parse tests without files

Previously the "Scan for tests" dialog would pop up
momentarily during project loading, even though no
files were loaded yet.

Partial fix for: QTCREATORBUG-27785

Change-Id: I4087ba23d00a628465dd1532a725d9bcc37dec30
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-10-20 15:36:28 +02:00
parent 9257a15a68
commit a2c052089b

View File

@@ -293,7 +293,11 @@ void TestCodeParser::scanForTests(const Utils::FilePaths &fileList,
qCDebug(LOG) << "File list empty (FullParse) - trying again in a sec"; qCDebug(LOG) << "File list empty (FullParse) - trying again in a sec";
emitUpdateTestTree(); emitUpdateTestTree();
return; return;
} else if (list.size() == 1 && list.first() == project->projectFilePath()) {
qCDebug(LOG) << "File list contains only the project file.";
return;
} }
qCDebug(LOG) << "setting state to FullParse (scanForTests)"; qCDebug(LOG) << "setting state to FullParse (scanForTests)";
m_parserState = FullParse; m_parserState = FullParse;
} else { } else {