diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 373968285..032919111 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -638,13 +638,17 @@ QList ContainmentInterface::actions() const //use a multimap to sort by action type QMultiMap actions; + int i = 0; foreach (QAction *a, m_containment->actions()->actions()) { //FIXME QML visualizations don't support menus for now, *and* there is no way to //distinguish them on QML side if (!a->menu()) { - actions.insert(a->data().toInt(), a); + actions.insert(a->data().toInt()*100 + i, a); + ++i; } } + + i = 0; foreach (QAction *a, m_containment->corona()->actions()->actions()) { if (a->objectName() == QStringLiteral("lock widgets") || a->menu()) { //It is up to the Containment to decide if the user is allowed or not @@ -653,7 +657,8 @@ QList ContainmentInterface::actions() const //one continue; } - actions.insert(a->data().toInt(), a); + actions.insert(a->data().toInt()*100 + i, a); + ++i; } return actions.values(); }