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/AppItem.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/launcher/AppItem.qml') diff --git a/modules/launcher/AppItem.qml b/modules/launcher/AppItem.qml index ab815ab..0b893bb 100644 --- a/modules/launcher/AppItem.qml +++ b/modules/launcher/AppItem.qml @@ -13,8 +13,8 @@ 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 @@ -34,7 +34,7 @@ Item { IconImage { id: icon - source: Quickshell.iconPath(root.modelData.icon, "image-missing") + source: Quickshell.iconPath(root.modelData?.icon, "image-missing") implicitSize: parent.height * 0.8 anchors.verticalCenter: parent.verticalCenter @@ -51,12 +51,12 @@ Item { StyledText { id: name - text: root.modelData.name + text: root.modelData?.name ?? "" font.pointSize: Appearance.font.size.normal } StyledText { - text: root.modelData.comment || root.modelData.genericName || root.modelData.name + text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? "" font.pointSize: Appearance.font.size.small color: Colours.alpha(Colours.palette.m3outline, true) -- cgit v1.2.3-freya