Cocoa Menu: Set keyboard modifiers when item is activated

Seems to be a regression from 4.8, which is not surprising
since everything was rewritten for QPA.

Task-number: QTBUG-36851
Change-Id: If89f8c9e6897fd1e02800f49e51baeb1ea181238
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
This commit is contained in:
Gabriel de Dietrich 2014-02-24 14:54:30 +01:00 committed by The Qt Project
parent c453571d75
commit 15ec9907f9

View File

@ -127,6 +127,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaMenuDelegate);
{ {
QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]); QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]);
QScopedLoopLevelCounter loopLevelCounter(QGuiApplicationPrivate::instance()->threadData); QScopedLoopLevelCounter loopLevelCounter(QGuiApplicationPrivate::instance()->threadData);
QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers:[NSEvent modifierFlags]];
cocoaItem->activated(); cocoaItem->activated();
} }