forked from qt-creator/qt-creator
AutoTest: Cancel possible running tasks on shutdown
If tasks are running while shutting down we might end up in a crash, so cancel all tasks and handle possible invalid accesses of the current running processing. Change-Id: I69f7cac5f44390e322fa301af6d6794270c95c2a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -90,6 +90,8 @@ static bool handleGTest(QFutureInterface<TestParseResultPtr> futureInterface,
|
||||
const QList<CppTools::ProjectPart::Ptr> &ppList = modelManager->projectPart(filePath);
|
||||
if (ppList.size())
|
||||
proFile = ppList.first()->projectFile;
|
||||
else
|
||||
return false; // happens if shutting down while parsing
|
||||
|
||||
foreach (const GTestCaseSpec &testSpec, result.keys()) {
|
||||
GTestParseResult *parseResult = new GTestParseResult(id);
|
||||
|
||||
Reference in New Issue
Block a user