diff --git a/declarativeimports/plasmacomponents/qmenu.cpp b/declarativeimports/plasmacomponents/qmenu.cpp index 5aa62baf3..c46458c15 100644 --- a/declarativeimports/plasmacomponents/qmenu.cpp +++ b/declarativeimports/plasmacomponents/qmenu.cpp @@ -93,6 +93,10 @@ void QMenuProxy::itemTriggered(QAction *action) QMenuItem *item = qobject_cast(action); if (item) { emit triggered(item); + int index = m_items.indexOf(item); + if (index > -1) { + emit triggeredIndex(index); + } } } diff --git a/declarativeimports/plasmacomponents/qmenu.h b/declarativeimports/plasmacomponents/qmenu.h index 58144e5db..0621f2f23 100644 --- a/declarativeimports/plasmacomponents/qmenu.h +++ b/declarativeimports/plasmacomponents/qmenu.h @@ -58,7 +58,8 @@ public: Q_SIGNALS: void statusChanged(); void visualParentChanged(); - void triggered(QMenuItem*); + void triggered(QMenuItem *item); + void triggeredIndex(int index); private Q_SLOTS: void itemTriggered(QAction *item);