From 4ca23da8e139deaf4615a39e7e7ffbd7fbd3ab61 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 24 May 2025 13:47:45 +0800 Subject: internal: fix null errors --- modules/launcher/ActionItem.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/launcher/ActionItem.qml') diff --git a/modules/launcher/ActionItem.qml b/modules/launcher/ActionItem.qml index 800c937..f4f90a2 100644 --- a/modules/launcher/ActionItem.qml +++ b/modules/launcher/ActionItem.qml @@ -11,14 +11,14 @@ Item { implicitHeight: LauncherConfig.sizes.itemHeight - anchors.left: parent.left - anchors.right: parent.right + anchors.left: parent?.left + anchors.right: parent?.right StateLayer { radius: Appearance.rounding.full function onClicked(): void { - root.modelData.onClicked(root.list); + root.modelData?.onClicked(root.list); } } @@ -31,7 +31,7 @@ Item { MaterialIcon { id: icon - text: root.modelData.icon + text: root.modelData?.icon ?? "" font.pointSize: Appearance.font.size.extraLarge anchors.verticalCenter: parent.verticalCenter @@ -48,12 +48,12 @@ Item { StyledText { id: name - text: root.modelData.name + text: root.modelData?.name ?? "" font.pointSize: Appearance.font.size.normal } StyledText { - text: root.modelData.desc + text: root.modelData?.desc ?? "" font.pointSize: Appearance.font.size.small color: Colours.alpha(Colours.palette.m3outline, true) -- cgit v1.2.3-freya