summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-01-31 11:10:26 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-02-01 11:47:58 +0000
commit0d9f4e7526fbf1e072aa3518e4e5313332ee4f18 (patch)
tree3d7c3a6851358c9ee87ba62b1f26cf8c1574ac37 /src/widgets/widgets/qmenu.h
parent2628e897fe3738ee86dacccea72e4a5b6aed9715 (diff)
Make one QT_REMOVED_SINCE/QT_BUILD_REMOVED_API per module
A single global QT_REMOVED_SINCE will start hurting us once more modules downstream of QtCore start using the mechanism. With every use of feature, the set of code that needs to compile under QT_BUILD_REMOVED_API increases. Since we use QT_REMOVED_SINCE in situations where overloading the new and the old function don't work in general, this means all code included by any removed_api.cpp needs to be very carefully written to ensure that any calls to the overload set formed by the combination of old and new function(s) don't create ambiguities. Likewise, the set of APIs that change semantics under QT_BUILD_REMOVED_API also increases. At some point, the combination of removed_api.cpp including almost every module header and almost every header exposing source-incompatibilities when included in removed_api.cpp will make maintenance a headache. By making QT_REMOVED_SINCE and QT_BUILD_REMOVED_API per-module (QT_CORE_REMOVED_SINCE, ...), easy now that we generate the export macros using CMake, we limit the scope of this problem to the module using the feature. Downstream modules (say, QtWidgets) will now see the QtCore API like every other user, even in the widgets/compat/removed_api.cpp TU. Pick-to: 6.3 Change-Id: I177bc7bd5aa8791639f97946c98e4592d2c7f9d9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.h')
-rw-r--r--src/widgets/widgets/qmenu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h
index 1b14263e6b..ef5bdf7236 100644
--- a/src/widgets/widgets/qmenu.h
+++ b/src/widgets/widgets/qmenu.h
@@ -76,7 +76,7 @@ public:
~QMenu();
using QWidget::addAction;
-#if QT_REMOVED_SINCE(6, 3)
+#if QT_WIDGETS_REMOVED_SINCE(6, 3)
QAction *addAction(const QString &text);
QAction *addAction(const QIcon &icon, const QString &text);
#if !QT_CONFIG(shortcut)