summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorpeknurmi <qt-info@nokia.com>2009-06-03 06:44:41 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-03 06:47:34 (GMT)
commit3d19bb6e7572cad3644863f3f89cf67a3b7160d7 (patch)
treea815a85eac74c4b19a76cb19fb54a014eed38387 /src/gui/kernel/qapplication_s60.cpp
parente7341afb8050cfd8bc0f5c423ff0d495b510df58 (diff)
downloadQt-3d19bb6e7572cad3644863f3f89cf67a3b7160d7.zip
Qt-3d19bb6e7572cad3644863f3f89cf67a3b7160d7.tar.gz
Qt-3d19bb6e7572cad3644863f3f89cf67a3b7160d7.tar.bz2
Now qs60style does not send extra resize event in orientation change.
QSymbianControl::HandleResourceChange contained global event handling. So Qt handled same issues unnecessarily (for each shown top level widget). Now this global event handling is encapsulated to s60ResourceChange (new method) called by s60main. In addition, qs60style generated unnecessary resize events. If widget was fullscreen or maximized, then this caused incorrect resize events (old size delivered). With these changes, qs60style just informs widgets of style change (similarly as in qstylesheetstyle). Task-number: 251085 Reviewed-by: Jason Barron <jason.barron@nokia.com> Conflicts: src/gui/kernel/qapplication.h src/gui/styles/qs60style.cpp
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp56
1 files changed, 35 insertions, 21 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 7b1817f..dc2b9d3 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -649,21 +649,7 @@ void QSymbianControl::HandleResourceChange(int resourceType)
// font change event
break;
case KEikDynamicLayoutVariantSwitch:
- {
-#ifndef QT_NO_STYLE_S60
- QS60Style *s60Style = 0;
-
-#ifndef QT_NO_STYLE_STYLESHEET
- QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle*>(QApplication::style());
- if (proxy)
- s60Style = qobject_cast<QS60Style*>(proxy->baseStyle());
- else
-#endif
- s60Style = qobject_cast<QS60Style*>(QApplication::style());
-
- if (s60Style)
- s60Style->handleDynamicLayoutVariantSwitch();
-#endif
+ {
if (qwidget->isFullScreen()) {
SetExtentToWholeScreen();
} else if (qwidget->isMaximized()) {
@@ -672,12 +658,6 @@ void QSymbianControl::HandleResourceChange(int resourceType)
}
break;
}
-#ifndef QT_NO_STYLE_S60
- case KAknsMessageSkinChange:
- if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style()))
- s60Style->handleSkinChange();
- break;
-#endif
default:
break;
}
@@ -1060,6 +1040,40 @@ void QApplication::symbianHandleCommand(int command)
}
}
+void QApplication::s60ResourceChangeL(int type)
+{
+ switch (type) {
+ case KEikDynamicLayoutVariantSwitch:
+ {
+#ifndef QT_NO_STYLE_S60
+ QS60Style *s60Style = 0;
+
+#ifndef QT_NO_STYLE_STYLESHEET
+ QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle*>(QApplication::style());
+ if (proxy)
+ s60Style = qobject_cast<QS60Style*>(proxy->baseStyle());
+ else
+#endif
+ s60Style = qobject_cast<QS60Style*>(QApplication::style());
+
+ if (s60Style)
+ s60Style->handleDynamicLayoutVariantSwitch();
+#endif
+ }
+ break;
+
+#ifndef QT_NO_STYLE_S60
+ case KAknsMessageSkinChange:
+ if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style()))
+ s60Style->handleSkinChange();
+ break;
+#endif
+
+ default:
+ break;
+ }
+}
+
#ifndef QT_NO_WHEELEVENT
int QApplication::wheelScrollLines()
{