From 6995193219a64fd2bce73108fbfca25a5cc7e99b Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 26 Aug 2015 10:41:40 +0200 Subject: [PATCH] Make model param of clicked signal of var type When using ModelContextMenu with a JS array the "model" param of the clicked signal is null because QtObject property can only hold QObject but no JS objects. CHANGELOG: The onClicked signal of PlasmaComponents.ModelContextMenu now works properly if model is a JS Array of JS objects REVIEW: 124910 --- .../plasmacomponents/qml/ModelContextMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmacomponents/qml/ModelContextMenu.qml b/src/declarativeimports/plasmacomponents/qml/ModelContextMenu.qml index baa541a4b..f8fddb76c 100644 --- a/src/declarativeimports/plasmacomponents/qml/ModelContextMenu.qml +++ b/src/declarativeimports/plasmacomponents/qml/ModelContextMenu.qml @@ -58,7 +58,7 @@ PlasmaComponents.ContextMenu { * This signal is emitted when a menu item is clicked. * The attached model properties for that menu item are passed as an argument */ - signal clicked(QtObject model) + signal clicked(var model) //ContextMenu cannot have child items, so in order to have ContextMenu as the root object of this item //we create a new property which contains an item which can then load the child items