From 85a6446164531ad400e1e2a62a42353c85571a2c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 27 May 2013 19:56:12 +0200 Subject: [PATCH] Cocoa: Use actual modifiers when sending ShortcutOverride event Probably a typo since keyCode clearly has no modifiers encoded. Change-Id: I1c7908b06a759baf7b2c3462861a5d61f8c52b9f Reviewed-by: Frederik Gladhorn --- src/plugins/platforms/cocoa/qcocoamenu.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index 18e17a340d..25ece7349c 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -177,7 +177,7 @@ static inline QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *getMenuLoader() } QKeyEvent accel_ev(QEvent::ShortcutOverride, (keyCode & (~Qt::KeyboardModifierMask)), - Qt::KeyboardModifiers(keyCode & Qt::KeyboardModifierMask)); + Qt::KeyboardModifiers(modifiers & Qt::KeyboardModifierMask)); accel_ev.ignore(); QCoreApplication::sendEvent(object, &accel_ev); if (accel_ev.isAccepted()) {