Autotest: fix indentation computation in TestResultDelegate.

Change-Id: I6e2add861658757504ec715d0e86c6f0a9119301
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Francois Ferrand
2016-03-02 18:40:24 +01:00
parent 697ffd45d1
commit a86dbae28b

View File

@@ -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;