diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2010-11-22 16:05:42 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2010-11-23 12:26:59 (GMT) |
commit | 9746f31088961645e59c0d4a8d995601153a9ee7 (patch) | |
tree | 3cbd16bff489d868d9f5e49c713c5ff59dddfa76 /src/gui/styles | |
parent | 774a8ff7444001917287524ac57d370c6995dea0 (diff) | |
download | Qt-9746f31088961645e59c0d4a8d995601153a9ee7.zip Qt-9746f31088961645e59c0d4a8d995601153a9ee7.tar.gz Qt-9746f31088961645e59c0d4a8d995601153a9ee7.tar.bz2 |
Fix a namespace error and some warnings found by clang
Reviewed-by: Fabien Freling
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index a05ec6b..9ef2f02 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -1566,8 +1566,7 @@ void QMacStylePrivate::timerEvent(QTimerEvent *) progressBars.removeAt(i); } else { if (QProgressBar *pb = qobject_cast<QProgressBar *>(maybeProgress)) { - if (pb->maximum() == 0 || pb->value() > 0 - && pb->value() < pb->maximum()) { + if (pb->maximum() == 0 || (pb->value() > 0 && pb->value() < pb->maximum())) { if (doAnimate(AquaProgressBar)) pb->update(); } @@ -3608,7 +3607,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter break; } } - bool stretchTabs = (!verticalTabs && tabRect.height() > 22 || verticalTabs && tabRect.width() > 22); + bool stretchTabs = (!verticalTabs && tabRect.height() > 22) || (verticalTabs && tabRect.width() > 22); switch (tp) { case QStyleOptionTab::Beginning: @@ -4033,7 +4032,6 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter bdi.version = qt_mac_hitheme_version; bdi.state = kThemeMenuBarNormal; bdi.attributes = 0; - HIRect hirect = qt_hirectForQRect(mi->rect); HIThemeDrawMenuBarBackground(&menuRect, &bdi, cg, kHIThemeOrientationNormal); } @@ -5335,8 +5333,8 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op case SC_GroupBoxCheckBox: { // Cheat and use the smaller font if we need to bool checkable = groupBox->subControls & SC_GroupBoxCheckBox; - bool fontIsSet = (widget && widget->testAttribute(Qt::WA_SetFont) - || !QApplication::desktopSettingsAware()); + bool fontIsSet = (widget && widget->testAttribute(Qt::WA_SetFont)) + || !QApplication::desktopSettingsAware(); int tw; int h; int margin = flat || hasNoText ? 0 : 12; |