From a86dbae28bc3f4efc7ded10e2493d9208f5b2c15 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 2 Mar 2016 18:40:24 +0100 Subject: [PATCH] Autotest: fix indentation computation in TestResultDelegate. Change-Id: I6e2add861658757504ec715d0e86c6f0a9119301 Reviewed-by: Christian Stenger --- src/plugins/autotest/testresultdelegate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/testresultdelegate.h b/src/plugins/autotest/testresultdelegate.h index c740be34a45..521ac0505d9 100644 --- a/src/plugins/autotest/testresultdelegate.h +++ b/src/plugins/autotest/testresultdelegate.h @@ -72,7 +72,7 @@ private: m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX")); m_indentation = options.widget ? options.widget->style()->pixelMetric( QStyle::PM_TreeViewIndentation, &options) : 0; - m_level = srcModel->hasChildren(filterModel->mapToSource(options.index)) ? 1 : 2; + m_level = filterModel->mapToSource(options.index).parent() == srcModel->rootItem()->index() ? 1 : 2; int flexibleArea = lineAreaLeft() - textAreaLeft() - ITEM_SPACING; if (m_maxFileLength > flexibleArea / 2) m_realFileLength = flexibleArea / 2;