From 34da8734a2448763823b864c8e532f023888246f Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 23 May 2021 22:55:20 +0200 Subject: [PATCH] Fix qml warnings --- imports/NeoChat/Component/ChatBox/ChatBox.qml | 5 +++++ imports/NeoChat/Page/RoomPage.qml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/imports/NeoChat/Component/ChatBox/ChatBox.qml b/imports/NeoChat/Component/ChatBox/ChatBox.qml index f060edf54..deeda244b 100644 --- a/imports/NeoChat/Component/ChatBox/ChatBox.qml +++ b/imports/NeoChat/Component/ChatBox/ChatBox.qml @@ -61,6 +61,10 @@ Item { QQC2.Pane { id: connectionPane padding: fontMetrics.lineSpacing * 0.25 + FontMetrics { + id: fontMetrics + font: networkLabel.font + } spacing: 0 Kirigami.Theme.colorSet: Kirigami.Theme.View background: Rectangle { @@ -69,6 +73,7 @@ Item { visible: !Controller.isOnline width: parent.width QQC2.Label { + id: networkLabel text: i18n("NeoChat is offline. Please check your network connection.") } anchors.bottom: emojiPickerLoaderSeparator.top diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index 51466fc75..6464dd415 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -143,9 +143,9 @@ Kirigami.ScrollablePage { Item { id: hoverActions - property var event + property var event: null property bool showEdit: event && (event.author.id === Controller.activeConnection.localUserId && (event.eventType === "emote" || event.eventType === "message")) - property var bubble + property var bubble: null property var hovered: bubble && bubble.hovered property var visibleDelayed: (hovered || hoverHandler.hovered) && !Kirigami.Settings.isMobile onVisibleDelayedChanged: if (visibleDelayed) {