summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-24 09:41:55 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-24 09:41:55 (GMT)
commit359c59db1a21d4279ca254a77eb1ac5c6a6c1ff9 (patch)
treecffdc1ccec703ac8344ad2cc7478f07cf6e68bcc /src/gui/kernel/qwidget.cpp
parent9a42d9815b73e5ceb25360af02936bcb0454a965 (diff)
downloadQt-359c59db1a21d4279ca254a77eb1ac5c6a6c1ff9.zip
Qt-359c59db1a21d4279ca254a77eb1ac5c6a6c1ff9.tar.gz
Qt-359c59db1a21d4279ca254a77eb1ac5c6a6c1ff9.tar.bz2
Call FixNativeOrientation on Symbian for certain fullscreen qml views.
For fullscreen QDeclarativeViews that lock their orientation to the native orientation of the device an additional performance gain can be achieved by calling FixNativeOrientation on the underlying RWindow. Such apps will either work in a single orientation only, or they will handle rotation themselves, by using QPainter transformations and opting out from the standard Avkon auto-rotation. In any of these cases there is no need for the lower level layers of the system to handle graphics surface rotation, the app is "fixed" to the native orientation from their point of view, therefore it is safe to call FixNativeOrientation(). Task-number: QTBUG-17742 Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index e8d9efd..0a73481 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -306,6 +306,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, qd_hd(0)
#elif defined(Q_OS_SYMBIAN)
, symbianScreenNumber(0)
+ , fixNativeOrientationCalled(false)
#endif
{
if (!qApp) {
@@ -10866,6 +10867,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
S60->orientationSet = true;
+ QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
+ if (window)
+ window->ensureFixNativeOrientation();
#endif
break;
}