From ec65d43b65ddc8b7425a9e031e5ab63bf634ea09 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 Jul 2020 09:14:03 +0200 Subject: [PATCH] AutoTest: Fix auto expansion of test results We may add items that have sub-items already, so apply the expansion to them as well if necessary. Change-Id: Ibff4433c5a7c0a110461e46998cd39864f4ec929 Reviewed-by: David Schulz --- src/plugins/autotest/testresultmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotest/testresultmodel.cpp b/src/plugins/autotest/testresultmodel.cpp index f91bda8ac01..7ea5f7d9d8f 100644 --- a/src/plugins/autotest/testresultmodel.cpp +++ b/src/plugins/autotest/testresultmodel.cpp @@ -289,8 +289,11 @@ void TestResultModel::addTestResult(const TestResultPtr &testResult, bool autoEx addFileName(testResult->fileName()); // ensure we calculate the results pane correctly if (parentItem) { parentItem->appendChild(newItem); - if (autoExpand) + if (autoExpand) { parentItem->expand(); + newItem->expand(); + newItem->forAllChildren([](Utils::TreeItem *it) { it->expand(); }); + } updateParent(newItem); } else { if (lastRow >= 0) {