AutoTest: Make test tree root items checkable

This allows (de)selecting of all test cases of a specific test
framework.

Change-Id: I21357d3dbcfce73387f157b1b40686f437fa260b
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-02-02 15:05:32 +01:00
parent 202d4a52a0
commit ba1a657227
7 changed files with 24 additions and 8 deletions

View File

@@ -82,6 +82,10 @@ void TestTreeView::changeCheckStateAll(const Qt::CheckState checkState)
item->setChecked(checkState);
}
}
if (count == 0) {
if (auto item = static_cast<TestTreeItem *>(currentRootIndex.internalPointer()))
item->setChecked(checkState);
}
emit dataChanged(currentRootIndex, last);
}
}