From d7f19efbd65d21ffb9824c041c2b9d3ba04fd968 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 2 Sep 2025 22:49:27 +0200 Subject: [PATCH] Fix qml warnings in MimeComponent --- src/messagecontent/MimeComponent.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/messagecontent/MimeComponent.qml b/src/messagecontent/MimeComponent.qml index cfd652ee8..f11892d09 100644 --- a/src/messagecontent/MimeComponent.qml +++ b/src/messagecontent/MimeComponent.qml @@ -12,6 +12,8 @@ import org.kde.kirigami as Kirigami * @brief A component to show media based upon its mime type. */ RowLayout { + id: root + property alias mimeIconSource: icon.source property alias label: nameLabel.text property string subLabel: "" @@ -43,10 +45,10 @@ RowLayout { Layout.fillWidth: true - text: (subLabel || size || duration || '') && [ - subLabel, - size && Format.formatByteSize(size), - duration > 0 && Format.formatDuration(duration), + text: (root.subLabel || root.size || root.duration || '') && [ + root.subLabel, + root.size && Format.formatByteSize(root.size), + root.duration > 0 && Format.formatDuration(root.duration), ].filter(Boolean).join(" | ") elide: Text.ElideRight