AutoTest: Extract decision of adding filtered items

The old approach was working due to the fact that all
test frameworks followed a fixed type scheme and tried
to handle differences between the AutoTest plugin and
the "real" world of the test framework internally.
Generalizing this decision does no more make sense when
adding an optional test suite layer.

Change-Id: I4788150a8935d8e35e557df8475aa95c8ca545b4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2019-05-15 07:20:18 +02:00
parent 7ac9990fe6
commit 9c06940dc9
4 changed files with 9 additions and 1 deletions

View File

@@ -215,7 +215,7 @@ void TestTreeModel::syncTestFrameworks()
void TestTreeModel::filterAndInsert(TestTreeItem *item, TestTreeItem *root, bool groupingEnabled)
{
TestTreeItem *filtered = item->applyFilters();
if (item->type() != TestTreeItem::TestCase || item->childCount())
if (item->shouldBeAddedAfterFiltering())
insertItemInParent(item, root, groupingEnabled);
else // might be that all children have been filtered out
delete item;