Remove widget attribute orientation values from Qt:: enum.
authorRobin Burchell <robin.burchell@collabora.com>
Thu, 15 Dec 2011 09:18:37 +0000 (10:18 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sun, 18 Dec 2011 14:15:12 +0000 (15:15 +0100)
These were only actually implemented on Symbian, thus, they aren't too useful,
apart from confusing developers when they don't work.

Removed per the discussion on:
http://lists.qt-project.org/pipermail/development/2011-December/000860.html

Change-Id: Id097cb392a3d964364adbe51a72a22927b9c382c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/corelib/global/qnamespace.h
src/corelib/global/qnamespace.qdoc
src/widgets/kernel/qwidget.cpp

index 2e4bc0e..456be48 100644 (file)
@@ -466,10 +466,6 @@ public:
         WA_Maemo5StackedWindow = 127,
 #endif
 
-        WA_LockPortraitOrientation = 128,
-        WA_LockLandscapeOrientation = 129,
-        WA_AutoOrientation = 130,
-
 #if 0 // these values are reserved for Maemo5 - do not re-use them
         WA_Maemo5PortraitOrientation = WA_LockPortraitOrientation,
         WA_Maemo5LandscapeOrientation = WA_LockLandscapeOrientation,
@@ -478,7 +474,6 @@ public:
 #endif
 
         WA_X11DoNotAcceptFocus = 132,
-        WA_SymbianNoSystemRotation = 133,
         WA_MacNoShadow = 134,
 
         // Add new attributes before this line
index 63ac4a9..4abe981 100644 (file)
     to this top level window. This attribute has no effect on non-X11
     platforms.
 
-    \value WA_LockPortraitOrientation Locks the widget to a portrait orientation,
-    ignoring changes to the display's orientation with respect to the user.
-    \value WA_LockLandscapeOrientation Locks the widget to a landscape orientation,
-    ignoring changes to the display's orientation with respect to the user.
-    \value WA_AutoOrientation Causes the widget to change orientation whenever the
-    display changes orientation with respect to the user.
-    
     \value WA_MacNoShadow Since Qt 4.8, this attribute disables drop shadows
     for this top level window. Only affects Cocoa builds of Qt for Mac OS X.
 
     \omitvalue WA_SetWindowModality
     \omitvalue WA_WState_WindowOpacitySet
     \omitvalue WA_WState_AcceptedTouchBeginEvent
-    \omitvalue WA_SymbianNoSystemRotation
 */
 
 /*! \typedef Qt::HANDLE
index d20e979..68d1b43 100644 (file)
@@ -10313,45 +10313,6 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
             d->registerTouchWindow();
 #endif
         break;
-    case Qt::WA_LockPortraitOrientation:
-    case Qt::WA_LockLandscapeOrientation:
-    case Qt::WA_AutoOrientation: {
-        const Qt::WidgetAttribute orientations[3] = {
-            Qt::WA_LockPortraitOrientation,
-            Qt::WA_LockLandscapeOrientation,
-            Qt::WA_AutoOrientation
-        };
-
-        if (on) {
-            // We can only have one of these set at a time
-            for (int i = 0; i < 3; ++i) {
-                if (orientations[i] != attribute)
-                    setAttribute_internal(orientations[i], false, data, d);
-            }
-        }
-
-#ifdef Q_WS_S60
-        CAknAppUiBase* appUi = static_cast<CAknAppUiBase*>(CEikonEnv::Static()->EikAppUi());
-        const CAknAppUiBase::TAppUiOrientation s60orientations[] = {
-            CAknAppUiBase::EAppUiOrientationPortrait,
-            CAknAppUiBase::EAppUiOrientationLandscape,
-            CAknAppUiBase::EAppUiOrientationAutomatic
-        };
-        CAknAppUiBase::TAppUiOrientation s60orientation = CAknAppUiBase::EAppUiOrientationUnspecified;
-        for (int i = 0; i < 3; ++i) {
-            if (testAttribute(orientations[i])) {
-                s60orientation = s60orientations[i];
-                break;
-            }
-        }
-        QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
-        S60->orientationSet = true;
-        QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
-        if (window)
-            window->ensureFixNativeOrientation();
-#endif
-        break;
-    }
     default:
         break;
     }