aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickmenu.cpp')
-rw-r--r--src/quicktemplates2/qquickmenu.cpp4
1 files changed, 4 insertions, 0 deletions
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 <QtGui/qevent.h>
#include <QtGui/qcursor.h>
+#if QT_CONFIG(shortcut)
#include <QtGui/qkeysequence.h>
+#endif
#include <QtGui/qpa/qplatformintegration.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtQml/qqmlcontext.h>
@@ -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;