From d184a72af73af0a3984ecac6179e3a5294838af4 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 27 Apr 2021 00:05:22 +0900 Subject: Fix build without features.shortcut Change-Id: I871e115f27c3c43a9e9b2e23392cd1dcbfb0cec0 Pick-to: 6.1 6.0 5.15 Reviewed-by: Mitch Curtis --- src/imports/platform/qquickplatformmenuitem.cpp | 2 ++ src/imports/templates/qtquicktemplates2plugin.cpp | 1 + src/quicktemplates2/qquickmenu.cpp | 4 ++++ 3 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp index 2e6fb974..4f61d423 100644 --- a/src/imports/platform/qquickplatformmenuitem.cpp +++ b/src/imports/platform/qquickplatformmenuitem.cpp @@ -40,7 +40,9 @@ #include "qquickplatformiconloader_p.h" #include +#if QT_CONFIG(shortcut) #include +#endif #include #include #include diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index 732cb3f8..da89601d 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -36,6 +36,7 @@ #include #include +#include #if QT_CONFIG(shortcut) #include diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp index aceae36a..5b54b0db 100644 --- a/src/quicktemplates2/qquickmenu.cpp +++ b/src/quicktemplates2/qquickmenu.cpp @@ -45,7 +45,9 @@ #include #include +#if QT_CONFIG(shortcut) #include +#endif #include #include #include @@ -1488,12 +1490,14 @@ void QQuickMenu::keyPressEvent(QKeyEvent *event) d->propagateKeyEvent(event); break; +#if QT_CONFIG(shortcut) case Qt::Key_Alt: // If &mnemonic shortcut is enabled, go back to (possibly) the parent // menu bar so the shortcut key will be processed by the menu bar. if (!QKeySequence::mnemonic(QStringLiteral("&A")).isEmpty()) close(); break; +#endif default: break; -- cgit v1.2.3