aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/testtreeitemdelegate.cpp
diff options
context:
space:
mode:
authorChristian Stenger <[email protected]>2016-04-29 11:15:14 +0200
committerChristian Stenger <[email protected]>2016-05-19 12:10:48 +0000
commit70394b29af61b4a4eeb54dbb83d7c0d9c0bab628 (patch)
tree3982ac507f4e1b98f16fd0fefff81d816afdc169 /src/plugins/autotest/testtreeitemdelegate.cpp
parentf429b95b0e36265944eea56cfbacb4fed9d210c5 (diff)
AutoTest: Make delegate independent from sub-classes...
...of TestTreeItem. Change-Id: Ieacaeff64dced5e2a4dd3bd3a853cfb1081f5146 Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testtreeitemdelegate.cpp')
-rw-r--r--src/plugins/autotest/testtreeitemdelegate.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/autotest/testtreeitemdelegate.cpp b/src/plugins/autotest/testtreeitemdelegate.cpp
index 9771385c8a4..e7151632e1d 100644
--- a/src/plugins/autotest/testtreeitemdelegate.cpp
+++ b/src/plugins/autotest/testtreeitemdelegate.cpp
@@ -25,7 +25,6 @@
#include "testtreeitem.h"
#include "testtreeitemdelegate.h"
-#include "testtreemodel.h"
#include <QPainter>
@@ -70,8 +69,8 @@ void TestTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
}
}
- // paint disabled googletests in gray
- if (index.data(StateRole).toInt() & GoogleTestTreeItem::Disabled)
+ // paint disabled items in gray
+ if (!index.data(EnabledRole).toBool())
opt.palette.setColor(QPalette::Text, QColor(0xa0, 0xa0, 0xa0));
QStyledItemDelegate::paint(painter, opt, index);