forked from qt-creator/qt-creator
AutoTest: Postpone removal of root node
If a root node should get removed while scanning we may end up crashing when still getting results. As there is currently no mechanism to stop a certain parser postpone the removal of the root node until the parsing is done. Change-Id: I3766f9e67780e241801166339fa67f39536314b4 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -485,6 +485,10 @@ void TestTreeModel::markForRemoval(const QSet<Utils::FilePath> &filePaths)
|
||||
void TestTreeModel::sweep()
|
||||
{
|
||||
for (TestTreeItem *frameworkRoot : frameworkRootNodes()) {
|
||||
if (frameworkRoot->m_status == TestTreeItem::ForcedRootRemoval) {
|
||||
frameworkRoot->framework()->resetRootNode();
|
||||
continue;
|
||||
}
|
||||
sweepChildren(frameworkRoot);
|
||||
revalidateCheckState(frameworkRoot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user