From 4daf5204babc62a7ae58b6de5c09c527f81ea27c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 20 Mar 2019 15:45:02 +0100 Subject: Cocoa: Clear the shortcut used when hiding a native menu entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shortcut needs to be cleared if the native menu entry is being hidden due to the fact it was changed. Otherwise it will not show the shortcut anymore as it sees it as in-use. Change-Id: Ifb10db855766e4de71db06ea006f6d63497f3193 Fixes: QTBUG-74113 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoamenu.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index 7b96fca3f9..f34988721d 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -250,6 +250,9 @@ void QCocoaMenu::syncMenuItem_helper(QPlatformMenuItem *menuItem, bool menubarUp if (wasMerged) { oldItem.enabled = NO; oldItem.hidden = YES; + oldItem.keyEquivalent = @""; + oldItem.keyEquivalentModifierMask = NSEventModifierFlagCommand; + } else { [m_nativeMenu removeItem:oldItem]; } -- cgit v1.2.3