diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-03-14 12:23:31 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-03-14 12:23:31 (GMT) |
commit | ad5ef5c565b0399c65827d67be8ff00fa8db1a68 (patch) | |
tree | 132193e0a18613125232d6025d1a56f265ca4a2e /src/gui | |
parent | 8f59ff17926e246ff732ce40890a3a7625b8e826 (diff) | |
download | Qt-ad5ef5c565b0399c65827d67be8ff00fa8db1a68.zip Qt-ad5ef5c565b0399c65827d67be8ff00fa8db1a68.tar.gz Qt-ad5ef5c565b0399c65827d67be8ff00fa8db1a68.tar.bz2 |
QS60Style slows down layout switch by updating widgets unnecessarily
Remove refreshUi() method frmo QS60Style. It might have been necessary
two years ago, when we didn't have proper polishing of QWidgets
(when style changed), but it is no longer needed.
It just slows down orientation switch.
Task-number: QTBUG-17840
Reviewed-by: Tomi Vihria
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 19 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 2 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 1 |
3 files changed, 0 insertions, 22 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 87d990e..15cb5c6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -630,25 +630,6 @@ QPixmap QS60StylePrivate::cachedFrame(SkinFrameElements frame, const QSize &size return result; } -void QS60StylePrivate::refreshUI() -{ - QList<QWidget *> widgets = QApplication::allWidgets(); - - for (int i = 0; i < widgets.size(); ++i) { - QWidget *widget = widgets.at(i); - if (widget == 0) - continue; - - if (widget->style()) { - widget->style()->polish(widget); - QEvent event(QEvent::StyleChange); - qApp->sendEvent(widget, &event); - } - widget->update(); - widget->updateGeometry(); - } -} - void QS60StylePrivate::setFont(QWidget *widget) const { QS60StyleEnums::FontCategories fontCategory = QS60StyleEnums::FC_Undefined; diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 242c451..c64cbb1 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -592,8 +592,6 @@ private: static QPixmap cachedFrame(SkinFrameElements frame, const QSize &size, SkinElementFlags flags = KDefaultSkinElementFlags); - static void refreshUI(); - // set S60 font for widget void setFont(QWidget *widget) const; void setThemePalette(QWidget *widget) const; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 600c631..b4785dc 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1429,7 +1429,6 @@ void QS60StylePrivate::handleDynamicLayoutVariantSwitch() { clearCaches(QS60StylePrivate::CC_LayoutChange); setActiveLayout(); - refreshUI(); foreach (QWidget *widget, QApplication::allWidgets()) widget->ensurePolished(); } |