aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imports/platform/qquickplatformmenuitem.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp
index 3a717047..b63f7202 100644
--- a/src/imports/platform/qquickplatformmenuitem.cpp
+++ b/src/imports/platform/qquickplatformmenuitem.cpp
@@ -121,6 +121,16 @@ QQuickPlatformMenuItem::~QQuickPlatformMenuItem()
m_menu->removeItem(this);
if (m_group)
m_group->removeItem(this);
+#if QT_CONFIG(shortcut)
+ if (m_shortcutId != -1) {
+ QKeySequence sequence;
+ if (m_shortcut.type() == QVariant::Int)
+ sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt()));
+ else
+ sequence = QKeySequence::fromString(m_shortcut.toString());
+ QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_shortcutId, this, sequence);
+ }
+#endif
delete m_iconLoader;
m_iconLoader = nullptr;
delete m_handle;