Cast qml object where necessary
This commit is contained in:
@@ -104,8 +104,8 @@ Kirigami.Page {
|
|||||||
enabled: hasExistingMeeting || canStartNewMeeting
|
enabled: hasExistingMeeting || canStartNewMeeting
|
||||||
visible: root.currentRoom && !root.currentRoom.isSpace
|
visible: root.currentRoom && !root.currentRoom.isSpace
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
const dialog = Qt.createComponent("org.kde.neochat", "MeetingDialog").createObject(QQC2.Overlay.overlay, { hasExistingMeeting });
|
const dialog = Qt.createComponent("org.kde.neochat", "MeetingDialog").createObject(QQC2.Overlay.overlay, { hasExistingMeeting }) as MeetingDialog;
|
||||||
dialog.onAccepted.connect(doAction);
|
dialog.accepted.connect(doAction);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ ColumnLayout {
|
|||||||
property bool autoOpenFile: false
|
property bool autoOpenFile: false
|
||||||
|
|
||||||
function saveFileAs() {
|
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.selectedFile = Message.room.fileNameToDownload(root.eventId);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Flow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = emojiDialog.createObject(reactButton);
|
var dialog = emojiDialog.createObject(reactButton) as EmojiDialog;
|
||||||
dialog.showStickers = false;
|
dialog.showStickers = false;
|
||||||
dialog.chosen.connect(emoji => {
|
dialog.chosen.connect(emoji => {
|
||||||
root.Message.room.toggleReaction(root.eventId, emoji);
|
root.Message.room.toggleReaction(root.eventId, emoji);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ FormCard.FormCardPage {
|
|||||||
QQC2.ToolButton {
|
QQC2.ToolButton {
|
||||||
text: i18n("Logout…")
|
text: i18n("Logout…")
|
||||||
icon.name: "im-kick-user"
|
icon.name: "im-kick-user"
|
||||||
onClicked: confirmLogoutDialogComponent.createObject(root.QQC2.Overlay.overlay).open()
|
onClicked: (confirmLogoutDialogComponent.createObject(root.QQC2.Overlay.overlay) as ConfirmLogoutDialog).open()
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ FormCard.FormCardPage {
|
|||||||
property NeoChatRoom room
|
property NeoChatRoom room
|
||||||
|
|
||||||
property PushRuleModel pushRuleModel: PushRuleModel {
|
property PushRuleModel pushRuleModel: PushRuleModel {
|
||||||
connection: root.room.connection
|
connection: root.room.connection as NeoChatConnection
|
||||||
}
|
}
|
||||||
|
|
||||||
title: i18nc('@title:window', 'Notifications')
|
title: i18nc('@title:window', 'Notifications')
|
||||||
|
|||||||
@@ -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.visible: hoverHandler.hovered
|
||||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ MessageDelegateBase {
|
|||||||
const menu = Qt.createComponent("org.kde.neochat", "UserMenu").createObject(root, {
|
const menu = Qt.createComponent("org.kde.neochat", "UserMenu").createObject(root, {
|
||||||
window: QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow,
|
window: QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow,
|
||||||
author: root.author,
|
author: root.author,
|
||||||
});
|
}) as UserMenu;
|
||||||
console.info(Qt.createComponent("org.kde.neochat", "UserMenu").errorString());
|
console.info(Qt.createComponent("org.kde.neochat", "UserMenu").errorString());
|
||||||
menu.popup(root.QQC2.Overlay.overlay);
|
menu.popup(root.QQC2.Overlay.overlay);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ RowLayout {
|
|||||||
display: QQC2.ToolButton.IconOnly
|
display: QQC2.ToolButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.reacting = true;
|
root.reacting = true;
|
||||||
var dialog = emojiDialog.createObject(reactButton);
|
var dialog = emojiDialog.createObject(reactButton) as EmojiDialog;
|
||||||
dialog.chosen.connect(emoji => {
|
dialog.chosen.connect(emoji => {
|
||||||
root.reacting = false;
|
root.reacting = false;
|
||||||
root.room.toggleReaction(root.eventId, emoji);
|
root.room.toggleReaction(root.eventId, emoji);
|
||||||
|
|||||||
Reference in New Issue
Block a user