Make disabled a state instead of separate type

State will be enhanced later on to provide better support for gtest.

Change-Id: I3f3f6b986d6a25ebd36fe44330c792608844b35c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-01-15 07:21:38 +01:00
committed by Niels Weber
parent 00f93b95a7
commit eca35ce868
6 changed files with 39 additions and 17 deletions

View File

@@ -65,7 +65,7 @@ void TestTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
}
// paint disabled googletests in gray
if (index.data(TypeRole).toInt() == TestTreeItem::GTestNameDisabled)
if (index.data(StateRole).toInt() & TestTreeItem::Disabled)
opt.palette.setColor(QPalette::Text, QColor(0xa0, 0xa0, 0xa0));
QStyledItemDelegate::paint(painter, opt, index);