summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-02-25 15:21:57 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-02-25 19:53:27 +0100
commit66e0079569393f29e542f8868ece2b9f3c362525 (patch)
tree3750de19c7e4f990701ed12342b71d944938b4c8
parent95aec76e3169d37d4d6ba908d8a96ce578cb45e2 (diff)
QStyle: deprecate enum values that are marked for removal in Qt 6
Those enum values are not used by widget code. Exception is PE_PanelItemViewRow, which is used by all item views, and no replacement is provided. So removing the ### Qt 6 comment from this value. Change-Id: Id4371bda5c3b14e3565c87ab233ee621d995f081 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/widgets/styles/qstyle.cpp2
-rw-r--r--src/widgets/styles/qstyle.h18
2 files changed, 12 insertions, 8 deletions
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 987465efae..5570d59276 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1075,7 +1075,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SE_TreeViewDisclosureItem Area for the actual disclosure item in a tree branch.
- \value SE_DialogButtonBoxLayoutItem Area that counts for the parent layout.
+ \omitvalue SE_DialogButtonBoxLayoutItem
\value SE_GroupBoxLayoutItem Area that counts for the parent layout.
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index 04628e6ef9..5be1b4b290 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -191,7 +191,7 @@ public:
PE_IndicatorItemViewItemDrop,
PE_PanelItemViewItem,
- PE_PanelItemViewRow, // ### Qt 6: remove
+ PE_PanelItemViewRow,
PE_PanelStatusBar,
@@ -332,8 +332,10 @@ public:
SE_CheckBoxLayoutItem,
SE_ComboBoxLayoutItem,
SE_DateTimeEditLayoutItem,
- SE_DialogButtonBoxLayoutItem, // ### Qt 6: remove
- SE_LabelLayoutItem,
+#if QT_DEPRECATED_SINCE(5, 15) // ### Qt 6: remove
+ SE_DialogButtonBoxLayoutItem Q_DECL_ENUMERATOR_DEPRECATED,
+#endif
+ SE_LabelLayoutItem = SE_DateTimeEditLayoutItem + 2,
SE_ProgressBarLayoutItem,
SE_PushButtonLayoutItem,
SE_RadioButtonLayoutItem,
@@ -535,11 +537,13 @@ public:
PM_SpinBoxSliderHeight,
- PM_DefaultTopLevelMargin, // ### Qt 6: remove
- PM_DefaultChildMargin, // ### Qt 6: remove
- PM_DefaultLayoutSpacing, // ### Qt 6: remove
+#if QT_DEPRECATED_SINCE(5, 15) // ### Qt 6: remove
+ PM_DefaultTopLevelMargin Q_DECL_ENUMERATOR_DEPRECATED,
+ PM_DefaultChildMargin Q_DECL_ENUMERATOR_DEPRECATED,
+ PM_DefaultLayoutSpacing Q_DECL_ENUMERATOR_DEPRECATED,
+#endif
- PM_ToolBarIconSize,
+ PM_ToolBarIconSize = PM_SpinBoxSliderHeight + 4,
PM_ListViewIconSize,
PM_IconViewIconSize,
PM_SmallIconSize,