summaryrefslogtreecommitdiffstats
path: root/tools/qml/deviceorientation_symbian.cpp
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-07-13 05:50:22 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-07-13 06:00:47 (GMT)
commitcb6472cb67511316f058b1eda4ffe71a1c4fe019 (patch)
tree16baa44163686a9043a085d57acef19d9c492a47 /tools/qml/deviceorientation_symbian.cpp
parent400b0d43830dfdcefb2f8bd91440ab6f4130ce0f (diff)
downloadQt-cb6472cb67511316f058b1eda4ffe71a1c4fe019.zip
Qt-cb6472cb67511316f058b1eda4ffe71a1c4fe019.tar.gz
Qt-cb6472cb67511316f058b1eda4ffe71a1c4fe019.tar.bz2
Only support portrait and landscape orientations on Symbian when updating the runtime.orientation property
Task-number: QTBUG-12036 Reviewed-by: Martin Jones
Diffstat (limited to 'tools/qml/deviceorientation_symbian.cpp')
-rw-r--r--tools/qml/deviceorientation_symbian.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp
index 48bfc72..c305f94 100644
--- a/tools/qml/deviceorientation_symbian.cpp
+++ b/tools/qml/deviceorientation_symbian.cpp
@@ -118,18 +118,14 @@ private:
data = dataBuf();
Orientation o = UnknownOrientation;
switch (data.iDeviceOrientation) {
- case TSensrvOrientationData::EOrientationDisplayRightUp:
- o = LandscapeInverted;
- break;
case TSensrvOrientationData::EOrientationDisplayUp:
o = Portrait;
break;
- case TSensrvOrientationData::EOrientationDisplayDown:
- o = PortraitInverted;
- break;
- case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ case TSensrvOrientationData::EOrientationDisplayRightUp:
o = Landscape;
break;
+ case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ case TSensrvOrientationData::EOrientationDisplayDown:
case TSensrvOrientationData::EOrientationUndefined:
case TSensrvOrientationData::EOrientationDisplayUpwards:
case TSensrvOrientationData::EOrientationDisplayDownwards:
@@ -137,7 +133,7 @@ private:
break;
}
- if (m_current != o) {
+ if (m_current != o && o != UnknownOrientation) {
m_current = o;
emit orientationChanged();
}