diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-20 13:08:26 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-08-28 18:22:50 +0200 |
commit | 1070dbf3e5aaf782cb369a74758b156bffd0a849 (patch) | |
tree | 3ea0fce78c253ed7c7d9b10b21fe2ba9122abb7f /src | |
parent | a3e359fb73262fd2b1bad55d9fc7a975f4eb1015 (diff) |
Mark some Qt namespace enum members properly as deprecated
A comment is not good enough, Some of the enum members were even still
in use, or mentioned in documentation.
WA_ContentsPropagated, WA_WState_DND and WA_ForceAcceptDrops have been
deprecated since 4.5.1; and at least the last has been an \omitvalue
in the docs for even longer. (WA_ShowModal and WA_GroupLeader have
been similarly marked, but are in use, see QTBUG-85816.)
Push back to 5.15.1 in order to be able to remove these at Qt 6.
Change-Id: I6ea3839767e5f5158b0fed508f65798470191908
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7883bf730405b20594dd1385b8e817160a5895f2)
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qnamespace.h | 18 | ||||
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsxpstyle.cpp | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index d98ece7e7f..ad4150b317 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -358,7 +358,9 @@ public: WA_Disabled = 0, WA_UnderMouse = 1, WA_MouseTracking = 2, - WA_ContentsPropagated = 3, // ## deprecated +#if QT_DEPRECATED_SINCE(5, 15) // commented as such since 4.5.1 + WA_ContentsPropagated Q_DECL_ENUMERATOR_DEPRECATED = 3, +#endif WA_OpaquePaintEvent = 4, #if QT_DEPRECATED_SINCE(5, 14) WA_NoBackground Q_DECL_ENUMERATOR_DEPRECATED = WA_OpaquePaintEvent, @@ -413,14 +415,16 @@ public: WA_WState_Reparented = 63, WA_WState_ConfigPending = 64, WA_WState_Polished = 66, - WA_WState_DND = 67, // ## deprecated +#if QT_DEPRECATED_SINCE(5, 15) // commented as such in 4.5.1 + WA_WState_DND Q_DECL_ENUMERATOR_DEPRECATED = 67, +#endif WA_WState_OwnSizePolicy = 68, WA_WState_ExplicitShowHide = 69, - WA_ShowModal = 70, // ## deprecated + WA_ShowModal = 70, // ## deprecated since since 4.5.1 but still in use :-( WA_MouseNoMask = 71, - WA_GroupLeader = 72, // ## deprecated - WA_NoMousePropagation = 73, // ## for now, might go away. + WA_GroupLeader = 72, // ## deprecated since since 4.5.1 but still in use :-( + WA_NoMousePropagation = 73, // for now, might go away. WA_Hover = 74, WA_InputMethodTransparent = 75, // Don't reset IM when user clicks on this (for virtual keyboards on embedded) WA_QuitOnClose = 76, @@ -429,7 +433,9 @@ public: WA_AcceptDrops = 78, WA_DropSiteRegistered = 79, // internal - WA_ForceAcceptDrops = WA_DropSiteRegistered, // ## deprecated +#if QT_DEPRECATED_SINCE(5, 15) // commented as such since 4.5.1 + WA_ForceAcceptDrops Q_DECL_ENUMERATOR_DEPRECATED_X("WA_ForceAcceptDrops is deprecated. Use WA_DropSiteRegistered instead") = WA_DropSiteRegistered, +#endif WA_WindowPropagation = 80, diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index b28b6a7251..23ea4f65e7 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -1165,9 +1165,6 @@ void QWindowsXPStyle::polish(QWidget *widget) widget->setWindowOpacity(0.6); } #endif - if (qobject_cast<QStackedWidget*>(widget) && - qobject_cast<QTabWidget*>(widget->parent())) - widget->parentWidget()->setAttribute(Qt::WA_ContentsPropagated); Q_D(QWindowsXPStyle); if (!d->hasInitColors) { diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 0a93e75dfa..479d91be0e 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -704,8 +704,7 @@ void QWidget::setAutoFillBackground(bool enabled) is no need to write double-buffering code in paintEvent() to avoid flicker. - Since Qt 4.1, the Qt::WA_ContentsPropagated widget attribute has been - deprecated. Instead, the contents of parent widgets are propagated by + Since Qt 4.1, the contents of parent widgets are propagated by default to each of their children as long as Qt::WA_PaintOnScreen is not set. Custom widgets can be written to take advantage of this feature by updating irregular regions (to create non-rectangular child widgets), or diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 1d358c493e..4663eda9eb 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -755,8 +755,6 @@ void QDockWidgetPrivate::updateButtons() button->setAccessibleName(QDockWidget::tr("Close")); button->setAccessibleDescription(QDockWidget::tr("Closes the dock widget")); #endif - q->setAttribute(Qt::WA_ContentsPropagated, - (canFloat || canClose) && !hideButtons); layout->invalidate(); } |