@@ -34,7 +34,7 @@ ActionItem {
34 val += units.gu(1) + title.contentWidth;
34 val += units.gu(1) + title.contentWidth;
35 if (hasSubmenu) {
35 if (hasSubmenu) {
36 val += units.gu(1) + chevronIcon.width;
36 val += units.gu(1) + chevronIcon.width;
37− } else if (menuData.shortcut != undefined) {
37+ } else if (menuData && menuData.shortcut != undefined) {
38 val += units.gu(3) + shortcutLabel.contentWidth;
38 val += units.gu(3) + shortcutLabel.contentWidth;
40 return val + units.gu(1);
40 return val + units.gu(1);
@@ -49,9 +49,9 @@ ActionItem {
49 enabled: root.enabled
49 enabled: root.enabled
51 // FIXME - SDK Action:text modifies menu text with html underline for mnemonic
51 // FIXME - SDK Action:text modifies menu text with html underline for mnemonic
52− text: menuData.label.replace("_", "&").replace("<u>", "&").replace("</u>", "")
52+ text: menuData ? menuData.label.replace("_", "&").replace("<u>", "&").replace("</u>", "") : ""
53− checkable: menuData.isCheck || menuData.isRadio
53+ checkable: menuData && (menuData.isCheck || menuData.isRadio)
54− checked: menuData.isToggled
54+ checked: menuData && menuData.isToggled
@@ -127,8 +127,8 @@ ActionItem {
127 color: enabled ? theme.palette.normal.overlaySecondaryText :
127 color: enabled ? theme.palette.normal.overlaySecondaryText :
128 theme.palette.disabled.overlaySecondaryText
128 theme.palette.disabled.overlaySecondaryText
130− visible: menuData.shortcut != undefined && !root.hasSubmenu && QuickUtils.keyboardAttached
130+ visible: menuData && menuData.shortcut != undefined && !root.hasSubmenu && QuickUtils.keyboardAttached
131− text: menuData.shortcut ? menuData.shortcut : ""
131+ text: menuData && menuData.shortcut ? menuData.shortcut : ""