forked from qt-creator/qt-creator
AutoTest: Avoid building tree of global items
Global items normally have no test name set. This patch avoids adding global items below other global items. Change-Id: Iabada78144ec48fc6687b360f79f1ef017c772a1 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -292,7 +292,7 @@ TestResultItem *TestResultModel::findParentItemFor(const TestResultItem *item,
|
||||
const TestResult *result = item->testResult();
|
||||
const QString &name = result->name();
|
||||
|
||||
if (root == nullptr) {
|
||||
if (root == nullptr && !name.isEmpty()) {
|
||||
for (int row = rootItem()->childCount() - 1; row >= 0; --row) {
|
||||
TestResultItem *tmp = static_cast<TestResultItem *>(rootItem()->childAt(row));
|
||||
if (tmp->testResult()->name() == name) {
|
||||
|
||||
Reference in New Issue
Block a user