Fix logic (and warnings) in ModelContextMenu

It was checking that a variable existed, then it used it. Now it works like
the rest of the properties.

REVIEW: 125809
This commit is contained in:
Aleix Pol 2015-10-26 18:14:41 +01:00
parent 1faf67489d
commit 36288df5ac

View File

@ -71,7 +71,7 @@ PlasmaComponents.ContextMenu {
text: typeof(modelData) != "undefined" ? modelData.text : model.display
icon: typeof(modelData) != "undefined" ? modelData.icon : model.decoration
separator: typeof(modelData) != "undefined" ? modelData.separator : model.separator === true
section: typeof(modelData) != "undefined" ? modelData.section : modelData.section === true
section: typeof(modelData) != "undefined" ? modelData.section : model.section === true
onClicked: {
menu.clicked(typeof(modelData) != "undefined" ? modelData : model)
}