summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-10-16 22:34:18 +0300
committerOrgad Shaneh <orgads@gmail.com>2014-10-17 08:52:40 +0200
commit649cd6fb22f11550fd855e8854b7e9ed96f5a0a8 (patch)
treef4dd27a89725f11e4cbd8cc68f4fdf412f927d53
parent4f70388acad28d3d8e30b6979e6f27a7ca2d998b (diff)
downloadqt-creator-649cd6fb22f11550fd855e8854b7e9ed96f5a0a8.tar.gz
ManhattanStyle: Fix wrong operator precedence
!option->state & State_Enabled is accidentially satisfied because State_Enabled is 1, so the condition is true for any non-zero value of option->state. Change-Id: I965012ceecbad7296fae4eff7d429dcb8391aa2c Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r--src/plugins/coreplugin/manhattanstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index fecf8b9472..8728b7fb75 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -745,7 +745,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
painter->setPen(QColor(0, 0, 0, 70));
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
}
- if (!option->state & State_Enabled)
+ if (!(option->state & State_Enabled))
painter->setOpacity(0.8);
painter->setPen(creatorTheme()->color(Theme::ComboBoxTextColor));
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);