From 016003905ca0e8e459e3dc33e786beda8ec92f45 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Jan 2015 17:00:07 -0500 Subject: Imported Upstream version 3.0.2 --- SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp') diff --git a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp index bda3040..a0da399 100644 --- a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp @@ -51,7 +51,7 @@ void CompleterItemDelegate::paintIcon(QPainter* painter, const QStyleOptionViewI iconRect.setSize(iconSize + QSize(spacer*2, spacer*2)); iconRect.setTopLeft(iconRect.topLeft() + QPoint(spacer, spacer)); - QIcon::State state = option.state & QStyle::State_Open ? QIcon::On : QIcon::Off; + QIcon::State state = (option.state & QStyle::State_Open) ? QIcon::On : QIcon::Off; icon.paint(painter, iconRect, option.decorationAlignment, mode, state); } @@ -60,7 +60,7 @@ void CompleterItemDelegate::paintText(QPainter* painter, const QStyleOptionViewI painter->save(); // Colors - QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; + QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) cg = QPalette::Inactive; -- cgit v1.2.3