From 79fac7527cd3285ea6b04f0afe7f429928ffa4cc Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 16 Jan 2023 00:36:43 +0900 Subject: [PATCH] Fix build with -no-feature-menu Change-Id: Ie18d896799dd99c74dcdf00cd43c2aedcd9b8d1c Reviewed-by: Volker Hilsheimer (cherry picked from commit cff65c860f8bcc4ae8611ba10f563fe58454d878) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/compat/removed_api.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/compat/removed_api.cpp b/src/widgets/compat/removed_api.cpp index 9a59f06284e..7fbb06cb5a6 100644 --- a/src/widgets/compat/removed_api.cpp +++ b/src/widgets/compat/removed_api.cpp @@ -9,6 +9,7 @@ QT_USE_NAMESPACE #if QT_WIDGETS_REMOVED_SINCE(6, 3) +#if QT_CONFIG(menu) #include "qmenu.h" QAction *QMenu::addAction(const QString &text) @@ -20,6 +21,7 @@ QAction *QMenu::addAction(const QIcon &icon, const QString &text) { return QWidget::addAction(icon, text); } +#endif #if !QT_CONFIG(shortcut) // the overloads taking QKeySequence as a trailing argument are deprecated, not removed,