diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2010-01-26 18:28:36 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2010-01-26 18:28:36 (GMT) |
commit | c7636e37e62b8df54cad331989be3173ba4ca27d (patch) | |
tree | f1ceba9453f16b3651ae29fa320f21fd06eed43c /src/gui/styles | |
parent | 56e36ce9d4e1ec81e41f6f74f4e5cd39070b1f8f (diff) | |
download | Qt-c7636e37e62b8df54cad331989be3173ba4ca27d.zip Qt-c7636e37e62b8df54cad331989be3173ba4ca27d.tar.gz Qt-c7636e37e62b8df54cad331989be3173ba4ca27d.tar.bz2 |
Remove warnings
MSVC revealed some issues that are worth a warning.
Reviewed-by: Sami Merila
modified: src/gui/styles/qs60style.cpp
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 24b2d34..ecb3242 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1985,7 +1985,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, */ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const { - Q_D(const QS60Style); const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; bool commonStyleDraws = false; @@ -2021,8 +2020,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff; painter->save(); - QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); - QColor windowTextColor = option->palette.windowText().color(); + const QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); + const QColor windowTextColor = option->palette.windowText().color(); if (themeColor != windowTextColor) painter->setPen(windowTextColor); @@ -2069,8 +2068,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti buttonRect.adjust(0, -newY, -1, -newY); painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); - QColor buttonTextColor = option->palette.buttonText().color(); + const QColor themeColor = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); + const QColor buttonTextColor = option->palette.buttonText().color(); if (themeColor != buttonTextColor) painter->setPen(buttonTextColor); else @@ -3002,9 +3001,8 @@ void QS60Style::unpolish(QApplication *application) */ bool QS60Style::event(QEvent *e) { - Q_D(QS60Style); - #ifdef QT_KEYPAD_NAVIGATION + Q_D(QS60Style); const QEvent::Type eventType = e->type(); if ((eventType == QEvent::FocusIn || eventType == QEvent::FocusOut || |