diff --git a/src/app/qml/RoomPage.qml b/src/app/qml/RoomPage.qml index fd5e7b7b1..efa37aaa7 100644 --- a/src/app/qml/RoomPage.qml +++ b/src/app/qml/RoomPage.qml @@ -104,8 +104,8 @@ Kirigami.Page { enabled: hasExistingMeeting || canStartNewMeeting visible: root.currentRoom && !root.currentRoom.isSpace onTriggered: { - const dialog = Qt.createComponent("org.kde.neochat", "MeetingDialog").createObject(QQC2.Overlay.overlay, { hasExistingMeeting }); - dialog.onAccepted.connect(doAction); + const dialog = Qt.createComponent("org.kde.neochat", "MeetingDialog").createObject(QQC2.Overlay.overlay, { hasExistingMeeting }) as MeetingDialog; + dialog.accepted.connect(doAction); dialog.open(); } diff --git a/src/messagecontent/FileComponent.qml b/src/messagecontent/FileComponent.qml index 3e5b60668..d236d0322 100644 --- a/src/messagecontent/FileComponent.qml +++ b/src/messagecontent/FileComponent.qml @@ -51,7 +51,7 @@ ColumnLayout { property bool autoOpenFile: false function saveFileAs() { - const dialog = fileDialog.createObject(QQC2.Overlay.overlay); + const dialog = fileDialog.createObject(QQC2.Overlay.overlay) as Dialogs.FileDialog; dialog.selectedFile = Message.room.fileNameToDownload(root.eventId); dialog.open(); } diff --git a/src/messagecontent/ReactionComponent.qml b/src/messagecontent/ReactionComponent.qml index ecbd96be7..a094b3eac 100644 --- a/src/messagecontent/ReactionComponent.qml +++ b/src/messagecontent/ReactionComponent.qml @@ -102,7 +102,7 @@ Flow { } onClicked: { - var dialog = emojiDialog.createObject(reactButton); + var dialog = emojiDialog.createObject(reactButton) as EmojiDialog; dialog.showStickers = false; dialog.chosen.connect(emoji => { root.Message.room.toggleReaction(root.eventId, emoji); diff --git a/src/settings/AccountsPage.qml b/src/settings/AccountsPage.qml index 32bd4ecfa..e9f54b04b 100644 --- a/src/settings/AccountsPage.qml +++ b/src/settings/AccountsPage.qml @@ -87,7 +87,7 @@ FormCard.FormCardPage { QQC2.ToolButton { text: i18n("Logout…") icon.name: "im-kick-user" - onClicked: confirmLogoutDialogComponent.createObject(root.QQC2.Overlay.overlay).open() + onClicked: (confirmLogoutDialogComponent.createObject(root.QQC2.Overlay.overlay) as ConfirmLogoutDialog).open() } Component { diff --git a/src/settings/PushNotification.qml b/src/settings/PushNotification.qml index bcfc18a01..4d9931c5e 100644 --- a/src/settings/PushNotification.qml +++ b/src/settings/PushNotification.qml @@ -17,7 +17,7 @@ FormCard.FormCardPage { property NeoChatRoom room property PushRuleModel pushRuleModel: PushRuleModel { - connection: root.room.connection + connection: root.room.connection as NeoChatConnection } title: i18nc('@title:window', 'Notifications') diff --git a/src/timeline/AvatarFlow.qml b/src/timeline/AvatarFlow.qml index 224d675bc..87fc1119b 100644 --- a/src/timeline/AvatarFlow.qml +++ b/src/timeline/AvatarFlow.qml @@ -72,7 +72,7 @@ RowLayout { } } - QQC2.ToolTip.text: root.model?.readMarkersString ?? "" + QQC2.ToolTip.text: (root.model as ReadMarkerModel)?.readMarkersString ?? "" QQC2.ToolTip.visible: hoverHandler.hovered QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay diff --git a/src/timeline/MessageDelegate.qml b/src/timeline/MessageDelegate.qml index 8637730f9..bdc6a4418 100644 --- a/src/timeline/MessageDelegate.qml +++ b/src/timeline/MessageDelegate.qml @@ -175,7 +175,7 @@ MessageDelegateBase { const menu = Qt.createComponent("org.kde.neochat", "UserMenu").createObject(root, { window: QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow, author: root.author, - }); + }) as UserMenu; console.info(Qt.createComponent("org.kde.neochat", "UserMenu").errorString()); menu.popup(root.QQC2.Overlay.overlay); } diff --git a/src/timeline/QuickActions.qml b/src/timeline/QuickActions.qml index d48c85cea..c7e42b200 100644 --- a/src/timeline/QuickActions.qml +++ b/src/timeline/QuickActions.qml @@ -43,7 +43,7 @@ RowLayout { display: QQC2.ToolButton.IconOnly onClicked: { root.reacting = true; - var dialog = emojiDialog.createObject(reactButton); + var dialog = emojiDialog.createObject(reactButton) as EmojiDialog; dialog.chosen.connect(emoji => { root.reacting = false; root.room.toggleReaction(root.eventId, emoji);