OSDN Git Service

remove unused widget attribute enums [ci reset]
authorIvailo Monev <xakepa10@gmail.com>
Fri, 17 Sep 2021 00:00:31 +0000 (03:00 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 17 Sep 2021 00:00:31 +0000 (03:00 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/global/qnamespace.h
src/core/global/qnamespace.qdoc
src/gui/kernel/qwidget.cpp

index ad94176..6d34eae 100644 (file)
@@ -794,48 +794,45 @@ public:
         WA_NativeWindow = 43,
         WA_DontCreateNativeAncestors = 44,
         WA_TranslucentBackground = 45,
-        WA_LockPortraitOrientation = 46,
-        WA_LockLandscapeOrientation = 47,
-        WA_AutoOrientation = 48,
-        WA_X11DoNotAcceptFocus = 49,
-        WA_X11BypassTransientForHint = 50,
+        WA_X11DoNotAcceptFocus = 46,
+        WA_X11BypassTransientForHint = 47,
 
         // window types from http://standards.freedesktop.org/wm-spec/
-        WA_X11NetWmWindowTypeDesktop = 51,
-        WA_X11NetWmWindowTypeDock = 52,
-        WA_X11NetWmWindowTypeToolBar = 53,
-        WA_X11NetWmWindowTypeMenu = 54,
-        WA_X11NetWmWindowTypeUtility = 55,
-        WA_X11NetWmWindowTypeSplash = 56,
-        WA_X11NetWmWindowTypeDialog = 57,
-        WA_X11NetWmWindowTypeDropDownMenu = 58,
-        WA_X11NetWmWindowTypePopupMenu = 59,
-        WA_X11NetWmWindowTypeToolTip = 60,
-        WA_X11NetWmWindowTypeNotification = 61,
-        WA_X11NetWmWindowTypeCombo = 62,
-        WA_X11NetWmWindowTypeDND = 63,
+        WA_X11NetWmWindowTypeDesktop = 48,
+        WA_X11NetWmWindowTypeDock = 49,
+        WA_X11NetWmWindowTypeToolBar = 50,
+        WA_X11NetWmWindowTypeMenu = 51,
+        WA_X11NetWmWindowTypeUtility = 52,
+        WA_X11NetWmWindowTypeSplash = 53,
+        WA_X11NetWmWindowTypeDialog = 54,
+        WA_X11NetWmWindowTypeDropDownMenu = 55,
+        WA_X11NetWmWindowTypePopupMenu = 56,
+        WA_X11NetWmWindowTypeToolTip = 57,
+        WA_X11NetWmWindowTypeNotification = 58,
+        WA_X11NetWmWindowTypeCombo = 59,
+        WA_X11NetWmWindowTypeDND = 60,
 
         // internal
-        WA_LaidOut = 64,
-        WA_GrabbedShortcut = 65,
-        WA_DontShowOnScreen = 66,
-        WA_ForceUpdatesDisabled = 67,
-        WA_StyledBackground = 68,
-        WA_StyleSheet = 69,
-        WA_DropSiteRegistered = 70,
-        WA_WState_Visible = 71,
-        WA_WState_Hidden = 72,
-        WA_WState_Created = 73,
-        WA_WState_InPaintEvent = 74,
-        WA_WState_Reparented = 75,
-        WA_WState_Polished = 76,
-        WA_WState_OwnSizePolicy = 77,
-        WA_WState_ExplicitShowHide = 78,
-        WA_WState_ConfigPending = 79,
-        WA_SetWindowIcon = 80,
-        WA_SetLayoutDirection = 81,
-        WA_SetWindowModality = 82,
-        WA_NoX11EventCompression = 83,
+        WA_LaidOut = 61,
+        WA_GrabbedShortcut = 62,
+        WA_DontShowOnScreen = 63,
+        WA_ForceUpdatesDisabled = 64,
+        WA_StyledBackground = 65,
+        WA_StyleSheet = 66,
+        WA_DropSiteRegistered = 67,
+        WA_WState_Visible = 68,
+        WA_WState_Hidden = 69,
+        WA_WState_Created = 70,
+        WA_WState_InPaintEvent = 71,
+        WA_WState_Reparented = 72,
+        WA_WState_Polished = 73,
+        WA_WState_OwnSizePolicy = 74,
+        WA_WState_ExplicitShowHide = 75,
+        WA_WState_ConfigPending = 76,
+        WA_SetWindowIcon = 77,
+        WA_SetLayoutDirection = 78,
+        WA_SetWindowModality = 79,
+        WA_NoX11EventCompression = 80,
 
         // Add new attributes before this line
         WA_AttributeCount
index 5572d36..71b4118 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.
-
     \omitvalue WA_DropSiteRegistered
     \omitvalue WA_SetLayoutDirection
     \omitvalue WA_WState_ConfigPending
index 207fc68..f567834 100644 (file)
@@ -9067,24 +9067,6 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
         }
         break;
     }
-    case Qt::WA_LockPortraitOrientation:
-    case Qt::WA_LockLandscapeOrientation:
-    case Qt::WA_AutoOrientation: {
-        static 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)
-                    d->widget_attributes.set(orientations[i], false);
-            }
-        }
-        break;
-    }
     default:
         break;
     }