AutoTest: Ensure removal of empty items if possible

Change-Id: I2cac91e56e8f22f89f88bbc82cc5f7b526500529
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-01-18 09:19:56 +01:00
parent 13ba063696
commit 30000c80af
4 changed files with 13 additions and 1 deletions

View File

@@ -348,6 +348,12 @@ bool QuickTestTreeItem::isGroupNodeFor(const TestTreeItem *other) const
return TestTreeItem::isGroupNodeFor(other);
}
bool QuickTestTreeItem::removeOnSweepIfEmpty() const
{
return TestTreeItem::removeOnSweepIfEmpty()
|| (type() == TestCase && name().isEmpty()); // remove pseudo item '<unnamed>'
}
TestTreeItem *QuickTestTreeItem::createParentGroupNode() const
{
if (filePath().isEmpty() || name().isEmpty())