on xenial help sign in
Fix more type errors
0a9395eRodney Dawes
qml/ApplicationMenus/ApplicationMenuItemFactory.qml+6−6
@@ -45,7 +45,7 @@ Object {
45
45
46 Action {
46 Action {
47 id: action
47 id: action
48− text: menuData.label.replace("_", "&")
48+ text: menuData ? menuData.label.replace("_", "&") : ""
49 }
49 }
50
50
51 ListItemLayout {
51 ListItemLayout {
@@ -53,14 +53,14 @@ Object {
53 title.text: action.text
53 title.text: action.text
54
54
55 Icon {
55 Icon {
56− source: menuData && menuData.icon || ""
56+ source: menuData ? menuData.icon : ""
57 SlotsLayout.position: SlotsLayout.Leading
57 SlotsLayout.position: SlotsLayout.Leading
58 height: units.gu(3)
58 height: units.gu(3)
59 }
59 }
60
60
61 Label {
61 Label {
62− text: menuData.shortcut
62+ text: menuData ? menuData.shortcut : ""
63− visible: menuData.shortcut && QuickUtils.keyboardAttached
63+ visible: menuData && menuData.shortcut && QuickUtils.keyboardAttached
64 SlotsLayout.position: SlotsLayout.Trailing
64 SlotsLayout.position: SlotsLayout.Trailing
65 color: enabled ? theme.palette.normal.backgroundSecondaryText :
65 color: enabled ? theme.palette.normal.backgroundSecondaryText :
66 theme.palette.disabled.backgroundSecondaryText
66 theme.palette.disabled.backgroundSecondaryText
@@ -86,7 +86,7 @@ Object {
86
86
87 Action {
87 Action {
88 id: action
88 id: action
89− text: menuData.label.replace("_", "&")
89+ text: menuData ? menuData.label.replace("_", "&") : ""
90 }
90 }
91
91
92 ListItemLayout {
92 ListItemLayout {
@@ -94,7 +94,7 @@ Object {
94 title.text: action.text
94 title.text: action.text
95
95
96 Icon {
96 Icon {
97− source: menuData && menuData.icon || ""
97+ source: menuData ? menuData.icon : ""
98 SlotsLayout.position: SlotsLayout.Leading
98 SlotsLayout.position: SlotsLayout.Leading
99 height: units.gu(3)
99 height: units.gu(3)
100 }
100 }