AutoTest: Fix filtering of results

If we enforce an update of siblings we must inform the model that
something might have changed to have this propagated to the
filter model as well. It is not enough to emit dataChanged()
for the parent.

Change-Id: Ia260d9ad131dab307b7ded34e4c20f76ec625e97
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-01-19 13:49:01 +01:00
parent 67aea18cc2
commit d4e2d8fc49

View File

@@ -201,7 +201,11 @@ void TestResultModel::addTestResult(const TestResultPtr &testResult, bool autoEx
if (autoExpand)
parentItem->expand();
if (testResult->result() == Result::MessageTestCaseEnd) {
parentItem->updateIntermediateChildren();
if (parentItem->childCount()) {
parentItem->updateIntermediateChildren();
emit dataChanged(parentItem->firstChild()->index(),
parentItem->lastChild()->index());
}
parentItem->updateResult();
emit dataChanged(parentItem->index(), parentItem->index());
}