Fix compilation of MeeGo/Maliit related code after Qt::ScreenOrientation API changes
authorSimon Hausmann <simon.hausmann@nokia.com>
Fri, 27 Jan 2012 12:39:45 +0000 (13:39 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 27 Jan 2012 12:55:55 +0000 (13:55 +0100)
Qt::UnknownOrientation is now Qt::PrimaryOrientation.

Change-Id: I2846a90bd11ecd1416c29b7bd861f180ccb129a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
src/plugins/generic/meego/qmeegointegration.cpp
src/plugins/platforminputcontexts/meego/qmeegoplatforminputcontext.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp

index 13f9e19..f387a88 100644 (file)
@@ -62,7 +62,7 @@ QMeeGoIntegration::~QMeeGoIntegration()
 void QMeeGoIntegration::updateScreenOrientation(const QVariant& topEdgeValue)
 {
     QString edge = topEdgeValue.toString();
-    Qt::ScreenOrientation orientation = Qt::UnknownOrientation;
+    Qt::ScreenOrientation orientation = Qt::PrimaryOrientation;
 
     // ### FIXME: This isn't perfect. We should obey the video_route (tv connected) and
     // the keyboard slider.
index 0df21e3..607dad6 100644 (file)
@@ -75,7 +75,7 @@ enum MaliitOrientationAngle {
 static int orientationAngle(Qt::ScreenOrientation orientation)
 {
     switch (orientation) {
-    case Qt::UnknownOrientation: // Urgh.
+    case Qt::PrimaryOrientation: // Urgh.
     case Qt::PortraitOrientation:
         return Angle270;
     case Qt::LandscapeOrientation:
index 6febe47..08c027d 100644 (file)
@@ -1156,7 +1156,7 @@ void QXcbWindow::setOrientation(Qt::ScreenOrientation orientation)
         case Qt::LandscapeOrientation: angle = 0; break;
         case Qt::InvertedPortraitOrientation: angle = 90; break;
         case Qt::InvertedLandscapeOrientation: angle = 180; break;
-        case Qt::UnknownOrientation: break;
+        case Qt::PrimaryOrientation: break;
     }
     Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
                                    atom(QXcbAtom::MeegoTouchOrientationAngle), XCB_ATOM_CARDINAL, 32,