forked from qt-creator/qt-creator
AutoTest: Make delegate independent from sub-classes...
...of TestTreeItem. Change-Id: Ieacaeff64dced5e2a4dd3bd3a853cfb1081f5146 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user