code cleanup
Using clang static analyser and cppcheck
Change-Id: Iff54cab58fb8d05a55f9fe32edffc3af8bcee7bd
diff --git a/historydelegate.cpp b/historydelegate.cpp
index 82a86ee..46516f8 100644
--- a/historydelegate.cpp
+++ b/historydelegate.cpp
@@ -43,7 +43,7 @@
QStyle *style = opt.widget ? opt.widget->style() : QApplication::style();
style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, opt.widget);
auto rect = opt.rect;
- QPalette::ColorGroup cg = opt.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
+ QPalette::ColorGroup cg = (opt.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(opt.state & QStyle::State_Active))
cg = QPalette::Inactive;
painter->setPen(opt.palette.color(cg, QPalette::Text));