summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2013-05-09 01:46:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-13 11:18:41 +0200
commit12e84748aae0d5b85a502ca2646b6bb57b2f4363 (patch)
tree72136435f72555feb9380f8bf86ed3770962a290 /src/plugins/platforms
parenta77e4ea20785fe412bad94ec95e0ab8723f60407 (diff)
Ensure the hovered signal is emitted for the action and menu for Cocoa
In the Cocoa platform plugin the hovered signal() was not being emitted for the corresponding QMenu. This now ensures it is emitted for the action itself and its QMenu. Task-number: QTBUG-30841 Change-Id: I3cfe634a71de7b55550e2561eb1c6a939536216d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index c5c5c132bc..18e17a340d 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -96,6 +96,16 @@ static inline QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *getMenuLoader()
return self;
}
+
+- (void)menu:(NSMenu*)menu willHighlightItem:(NSMenuItem*)item
+{
+ Q_UNUSED(menu);
+ if (item && [item tag]) {
+ QCocoaMenuItem *cocoaItem = reinterpret_cast<QCocoaMenuItem *>([item tag]);
+ cocoaItem->hovered();
+ }
+}
+
- (void) menuWillOpen:(NSMenu*)m
{
Q_UNUSED(m);