forked from qt-creator/qt-creator
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 <david.schulz@qt.io>
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user