Cocoa: fix gnu emacs style shortcut for action in menu

The regression was introduced in bdebec4e2e.

Cocoa QPA plugin only could handle the shortcut with one key sequence, not the
multiple key sequences. We just let Qt to handle those cases.

Task-number: QTBUG-33627

Change-Id: I3898308d9f4ecda8bd716d8b286f05f9f311774a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Liang Qi 2014-01-06 13:10:25 +01:00 committed by The Qt Project
parent 702bda5cc9
commit 183a3ca2ec
1 changed files with 3 additions and 4 deletions

View File

@ -279,13 +279,12 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
// (and reaches this point), then the menu item itself has been disabled.
// This occurs at the QPA level on Mac, were we disable all the Cocoa menus
// when showing a modal window.
Q_UNUSED(menu);
continue;
#else
if (a->shortcut().count() <= 1)
continue;
#endif
QAction *a = menu->menuAction();
if (correctActionContext(context, a, active_window))
return true;
#endif
} else
#endif
if (correctWidgetContext(context, w, active_window))