diff options
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.h | 7 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 5 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 20 |
3 files changed, 15 insertions, 17 deletions
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h index bdd8c8a..7711b19 100644 --- a/src/gui/styles/qs60style.h +++ b/src/gui/styles/qs60style.h @@ -89,12 +89,6 @@ public: bool saveS60ThemeToBlob(const QString &blobFile) const; #endif // !Q_WS_S60 -#ifdef Q_WS_S60 -public Q_SLOTS: - void handleDynamicLayoutVariantSwitch(); - void handleSkinChange(); -#endif // Q_WS_S60 - protected Q_SLOTS: QIcon standardIconImplementation( StandardPixmap standardIcon, const QStyleOption * option = 0, const QWidget * widget = 0 ) const; @@ -102,6 +96,7 @@ protected Q_SLOTS: private: Q_DISABLE_COPY(QS60Style) friend class QStyleFactory; + friend class QApplication; }; #endif // QT_NO_STYLE_S60 diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 0cd2310..680d787 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -455,6 +455,11 @@ public: SkinElementFlags flags = KDefaultSkinElementFlags); static QPixmap backgroundTexture(); +#ifdef Q_WS_S60 + void handleDynamicLayoutVariantSwitch(); + void handleSkinChange(); +#endif // Q_WS_S60 + private: static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter, const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 635442b..45be2eb 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1358,26 +1358,24 @@ QS60Style::QS60Style() { } -void QS60Style::handleDynamicLayoutVariantSwitch() +void QS60StylePrivate::handleDynamicLayoutVariantSwitch() { - Q_D(QS60Style); - d->clearCaches(QS60StylePrivate::CC_LayoutChange); - d->setActiveLayout(); - d->refreshUI(); - d->setBackgroundTexture(qApp); + clearCaches(QS60StylePrivate::CC_LayoutChange); + setActiveLayout(); + refreshUI(); + setBackgroundTexture(qApp); foreach (QWidget *widget, QApplication::allWidgets()) widget->ensurePolished(); } -void QS60Style::handleSkinChange() +void QS60StylePrivate::handleSkinChange() { - Q_D(QS60Style); - d->clearCaches(QS60StylePrivate::CC_ThemeChange); - d->setThemePalette(qApp); + clearCaches(QS60StylePrivate::CC_ThemeChange); + setThemePalette(qApp); foreach (QWidget *topLevelWidget, QApplication::allWidgets()){ QEvent e(QEvent::StyleChange); QApplication::sendEvent(topLevelWidget, &e); - d->setThemePalette(topLevelWidget); + setThemePalette(topLevelWidget); topLevelWidget->ensurePolished(); } } |