diff options
author | Andy Shaw <andy.shaw@digia.com> | 2013-05-09 01:46:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-13 11:18:41 +0200 |
commit | 12e84748aae0d5b85a502ca2646b6bb57b2f4363 (patch) | |
tree | 72136435f72555feb9380f8bf86ed3770962a290 /src/widgets/widgets/qmenu.cpp | |
parent | a77e4ea20785fe412bad94ec95e0ab8723f60407 (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/widgets/widgets/qmenu.cpp')
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index fde46c9729..33d2e01ed7 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2998,6 +2998,7 @@ void QMenu::actionEvent(QActionEvent *e) QGuiApplicationPrivate::platformTheme()->createPlatformMenuItem(); menuItem->setTag(reinterpret_cast<quintptr>(e->action())); QObject::connect(menuItem, SIGNAL(activated()), e->action(), SLOT(trigger())); + QObject::connect(menuItem, SIGNAL(hovered()), e->action(), SIGNAL(hovered())); copyActionToPlatformItem(e->action(), menuItem); QPlatformMenuItem* beforeItem = d->platformMenu->menuItemForTag(reinterpret_cast<quintptr>(e->before())); d->platformMenu->insertMenuItem(menuItem, beforeItem); |