Commit 3c230213 authored by Marius Pa's avatar Marius Pa Committed by Albert Astals Cid
Browse files

logtree 'selected' is of enum type, used as a variable of a Boolean-type

Fix PVS-Studio issue "logtree.cpp:358: warning: V768 The variable
'selected' is of enum type. It is odd that it is used as a variable of
a Boolean-type.".
parent af22bf85
Pipeline #231894 passed with stage
in 1 minute and 7 seconds
......@@ -355,7 +355,9 @@ void LogTreeView::paintRevisionCell(QPainter *p, int row, int col, const Cervisi
p->drawLine(midx, rect.y() + infoSize.height(), midx, cellSize.height()); // to the bottom
// The box itself
if (selected) {
if (selected == NoRevision) {
p->drawRoundedRect(rect, 10, 10);
} else {
if (selected == RevisionA) {
p->fillRect(rect, KColorScheme(QPalette::Active, KColorScheme::Selection).background());
p->setPen(KColorScheme(QPalette::Active, KColorScheme::Selection).foreground().color());
......@@ -365,8 +367,6 @@ void LogTreeView::paintRevisionCell(QPainter *p, int row, int col, const Cervisi
p->setPen(KColorScheme(QPalette::Active, KColorScheme::Selection).foreground().color().lighter(130));
p->drawText(rect, Qt::AlignLeft | Qt::AlignTop, "B");
}
} else {
p->drawRoundedRect(rect, 10, 10);
}
rect.setY(rect.y() + INSPACE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment