Use Qt.createComponent in non-weird way

Fixed #647
This commit is contained in:
Tobias Fella
2024-04-10 21:32:46 +02:00
parent e044e66030
commit f5aef8d0c3
43 changed files with 94 additions and 94 deletions

View File

@@ -23,7 +23,7 @@ ColumnLayout {
model: root.connection.accountDataEventTypes model: root.connection.accountDataEventTypes
delegate: FormCard.FormButtonDelegate { delegate: FormCard.FormButtonDelegate {
text: modelData text: modelData
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
sourceText: root.connection.accountDataJsonString(modelData) sourceText: root.connection.accountDataJsonString(modelData)
}, { }, {
title: i18nc("@title:window", "Event Source"), title: i18nc("@title:window", "Event Source"),

View File

@@ -46,7 +46,7 @@ ColumnLayout {
model: root.room.accountDataEventTypes model: root.room.accountDataEventTypes
delegate: FormCard.FormButtonDelegate { delegate: FormCard.FormButtonDelegate {
text: modelData text: modelData
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
sourceText: root.room.roomAcountDataJson(text) sourceText: root.room.roomAcountDataJson(text)
}, { }, {
title: i18n("Event Source"), title: i18n("Event Source"),
@@ -74,7 +74,7 @@ ColumnLayout {
description: i18ncp("'Event' being some JSON data, not something physically happening.", "%1 event of this type", "%1 events of this type", model.eventCount) description: i18ncp("'Event' being some JSON data, not something physically happening.", "%1 event of this type", "%1 events of this type", model.eventCount)
onClicked: { onClicked: {
if (model.eventCount === 1) { if (model.eventCount === 1) {
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
sourceText: stateModel.stateEventJson(stateModel.index(model.index, 0)) sourceText: stateModel.stateEventJson(stateModel.index(model.index, 0))
}, { }, {
title: i18n("Event Source"), title: i18n("Event Source"),

View File

@@ -31,7 +31,7 @@ FormCard.FormCardPage {
delegate: FormCard.FormButtonDelegate { delegate: FormCard.FormButtonDelegate {
text: model.stateKey text: model.stateKey
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
sourceText: stateKeysModel.stateEventJson(stateKeysModel.index(model.index, 0)) sourceText: stateKeysModel.stateEventJson(stateKeysModel.index(model.index, 0))
}, { }, {
title: i18nc("@title:window", "Event Source"), title: i18nc("@title:window", "Event Source"),

View File

@@ -22,7 +22,7 @@ QQC2.Menu {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Edit this account") text: i18n("Edit this account")
icon.name: "document-edit" icon.name: "document-edit"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Account editor") title: i18n("Account editor")
@@ -31,7 +31,7 @@ QQC2.Menu {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Notification settings") text: i18n("Notification settings")
icon.name: "notifications" icon.name: "notifications"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
defaultPage: "notifications", defaultPage: "notifications",
connection: root.connection connection: root.connection
}, { }, {
@@ -43,7 +43,7 @@ QQC2.Menu {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Devices") text: i18n("Devices")
icon.name: "computer-symbolic" icon.name: "computer-symbolic"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
defaultPage: "devices", defaultPage: "devices",
connection: root.connection connection: root.connection
}, { }, {
@@ -56,7 +56,7 @@ QQC2.Menu {
text: i18n("Open developer tools") text: i18n("Open developer tools")
icon.name: "tools" icon.name: "tools"
visible: Config.developerTools visible: Config.developerTools
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title:window", "Developer Tools"), title: i18nc("@title:window", "Developer Tools"),
@@ -68,7 +68,7 @@ QQC2.Menu {
text: i18nc("@action:inmenu", "Open Secret Backup") text: i18nc("@action:inmenu", "Open Secret Backup")
icon.name: "unlock" icon.name: "unlock"
visible: Config.secretBackup visible: Config.secretBackup
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog.qml'), {}, { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
title: i18nc("@title:window", "Open Key Backup") title: i18nc("@title:window", "Open Key Backup")
}) })
enabled: Controller.ssssSupported enabled: Controller.ssssSupported

View File

@@ -61,7 +61,7 @@ Kirigami.Dialog {
} }
onClicked: { onClicked: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'WelcomePage.qml'), {}, { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'WelcomePage'), {}, {
title: i18nc("@title:window", "Login") title: i18nc("@title:window", "Login")
}); });
if (switchUserButton.checked) { if (switchUserButton.checked) {

View File

@@ -43,6 +43,6 @@ LoginStep {
} }
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("Username.qml") onTriggered: root.processed("Username")
} }
} }

View File

@@ -110,7 +110,7 @@ Loader {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Room Settings") text: i18n("Room Settings")
icon.name: "configure" icon.name: "configure"
onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: room, room: room,
connection: connection connection: connection
}, { }, {
@@ -184,7 +184,7 @@ Loader {
QQC2.ToolButton { QQC2.ToolButton {
icon.name: 'settings-configure' icon.name: 'settings-configure'
onClicked: { onClicked: {
QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: room, room: room,
connection: root.connection connection: root.connection
}, { }, {

View File

@@ -111,7 +111,7 @@ FormCard.FormCardPage {
visible: !chosenRoomDelegate.visible visible: !chosenRoomDelegate.visible
text: i18nc("@action:button", "Pick room") text: i18nc("@action:button", "Pick room")
onClicked: { onClicked: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")
@@ -194,7 +194,7 @@ FormCard.FormCardPage {
} }
onClicked: { onClicked: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")

View File

@@ -95,7 +95,7 @@ Loader {
text: i18n("Remove") text: i18n("Remove")
icon.name: "edit-delete-remove" icon.name: "edit-delete-remove"
icon.color: "red" icon.color: "red"
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {
@@ -118,7 +118,7 @@ Loader {
text: i18nc("@action:button 'Report' as in 'Report this event to the administrators'", "Report") text: i18nc("@action:button 'Report' as in 'Report this event to the administrators'", "Report")
icon.name: "dialog-warning-symbolic" icon.name: "dialog-warning-symbolic"
visible: !author.isLocalUser visible: !author.isLocalUser
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReportSheet.qml'), { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReportSheet'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {

View File

@@ -55,6 +55,6 @@ LoginStep {
} }
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("Username.qml") onTriggered: root.processed("Username")
} }
} }

View File

@@ -23,7 +23,7 @@ RowLayout {
text: i18n("Explore rooms") text: i18n("Explore rooms")
icon.name: "compass" icon.name: "compass"
onTriggered: { onTriggered: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")
@@ -36,7 +36,7 @@ RowLayout {
property Kirigami.Action chatAction: Kirigami.Action { property Kirigami.Action chatAction: Kirigami.Action {
text: i18n("Find your friends") text: i18n("Find your friends")
icon.name: "list-add-user" icon.name: "list-add-user"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -46,7 +46,7 @@ RowLayout {
text: i18n("Create a Room") text: i18n("Create a Room")
icon.name: "system-users-symbolic" icon.name: "system-users-symbolic"
onTriggered: { onTriggered: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Create a Room") title: i18nc("@title", "Create a Room")
@@ -58,7 +58,7 @@ RowLayout {
text: i18n("Create a Space") text: i18n("Create a Space")
icon.name: "list-add" icon.name: "list-add"
onTriggered: { onTriggered: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
connection: root.connection, connection: root.connection,
isSpace: true, isSpace: true,
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")
@@ -71,7 +71,7 @@ RowLayout {
property Kirigami.Action scanAction: Kirigami.Action { property Kirigami.Action scanAction: Kirigami.Action {
text: i18n("Scan a QR Code") text: i18n("Scan a QR Code")
icon.name: "view-barcode-qr" icon.name: "view-barcode-qr"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "QrScannerPage.qml"), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "QrScannerPage"), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Scan a QR Code") title: i18nc("@title", "Scan a QR Code")

View File

@@ -52,7 +52,7 @@ ColumnLayout {
text: i18n("Explore rooms") text: i18n("Explore rooms")
icon.name: "compass" icon.name: "compass"
onTriggered: { onTriggered: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")
@@ -67,7 +67,7 @@ ColumnLayout {
text: i18n("Find your friends") text: i18n("Find your friends")
icon.name: "list-add-user" icon.name: "list-add-user"
onTriggered: { onTriggered: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -140,7 +140,7 @@ ColumnLayout {
text: i18n("Create a Room") text: i18n("Create a Room")
icon.name: "system-users-symbolic" icon.name: "system-users-symbolic"
onTriggered: { onTriggered: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomPage.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Create a Room") title: i18nc("@title", "Create a Room")
@@ -156,7 +156,7 @@ ColumnLayout {
text: i18n("Create a Space") text: i18n("Create a Space")
icon.name: "list-add" icon.name: "list-add"
onTriggered: { onTriggered: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
connection: root.connection, connection: root.connection,
isSpace: true, isSpace: true,
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")

View File

@@ -68,7 +68,7 @@ DelegateContextMenu {
text: i18n("Remove") text: i18n("Remove")
icon.name: "edit-delete-remove" icon.name: "edit-delete-remove"
icon.color: "red" icon.color: "red"
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {

View File

@@ -29,7 +29,7 @@ Labs.MenuBar {
text: i18nc("menu", "Configure NeoChat...") text: i18nc("menu", "Configure NeoChat...")
shortcut: StandardKey.Preferences shortcut: StandardKey.Preferences
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),
@@ -50,7 +50,7 @@ Labs.MenuBar {
Labs.MenuItem { Labs.MenuItem {
text: i18nc("menu", "Find your friends") text: i18nc("menu", "Find your friends")
enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0 enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0
onTriggered: pushReplaceLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), { onTriggered: pushReplaceLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -68,7 +68,7 @@ Labs.MenuBar {
Labs.MenuItem { Labs.MenuItem {
text: i18nc("menu", "Browse Chats…") text: i18nc("menu", "Browse Chats…")
onTriggered: { onTriggered: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")

View File

@@ -40,9 +40,9 @@ LoginStep {
nextAction: Kirigami.Action { nextAction: Kirigami.Action {
text: Registration.testing ? i18n("Loading") : null text: Registration.testing ? i18n("Loading") : null
enabled: Registration.status > Registration.ServerNoRegistration enabled: Registration.status > Registration.ServerNoRegistration
onTriggered: root.processed("Username.qml") onTriggered: root.processed("Username")
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("LoginRegister.qml") onTriggered: root.processed("LoginRegister")
} }
} }

View File

@@ -38,18 +38,18 @@ LoginStep {
text: LoginHelper.isLoggedIn ? i18n("Already logged in") : (LoginHelper.testing && matrixIdField.acceptableInput) ? i18n("Loading…") : i18nc("@action:button", "Continue") text: LoginHelper.isLoggedIn ? i18n("Already logged in") : (LoginHelper.testing && matrixIdField.acceptableInput) ? i18n("Loading…") : i18nc("@action:button", "Continue")
onTriggered: { onTriggered: {
if (LoginHelper.supportsSso && LoginHelper.supportsPassword) { if (LoginHelper.supportsSso && LoginHelper.supportsPassword) {
processed("LoginMethod.qml"); processed("LoginMethod");
} else if (LoginHelper.supportsSso) { } else if (LoginHelper.supportsSso) {
processed("Sso.qml"); processed("Sso");
} else { } else {
processed("Password.qml"); processed("Password");
} }
} }
enabled: LoginHelper.homeserverReachable enabled: LoginHelper.homeserverReachable
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: { onTriggered: {
root.processed("LoginRegister.qml"); root.processed("LoginRegister");
} }
} }
} }

View File

@@ -18,12 +18,12 @@ LoginStep {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
id: loginPasswordButton id: loginPasswordButton
text: i18nc("@action:button", "Login with password") text: i18nc("@action:button", "Login with password")
onClicked: processed("Password.qml") onClicked: processed("Password")
} }
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
id: loginSsoButton id: loginSsoButton
text: i18nc("@action:button", "Login with single sign-on") text: i18nc("@action:button", "Login with single sign-on")
onClicked: processed("Sso.qml") onClicked: processed("Sso")
} }
} }

View File

@@ -22,13 +22,13 @@ LoginStep {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
id: loginButton id: loginButton
text: i18nc("@action:button", "Login") text: i18nc("@action:button", "Login")
onClicked: root.processed("Login.qml") onClicked: root.processed("Login")
} }
FormCard.FormDelegateSeparator {} FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Register") text: i18nc("@action:button", "Register")
onClicked: root.processed("Homeserver.qml") onClicked: root.processed("Homeserver")
} }
} }

View File

@@ -48,7 +48,7 @@ DelegateContextMenu {
text: i18nc("@action:inmenu As in 'Forward this message'", "Forward") text: i18nc("@action:inmenu As in 'Forward this message'", "Forward")
icon.name: "mail-forward-symbolic" icon.name: "mail-forward-symbolic"
onTriggered: { onTriggered: {
let page = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog.qml'), { let page = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Forward Message"), title: i18nc("@title", "Forward Message"),

View File

@@ -15,7 +15,7 @@ LoginStep {
Connections { Connections {
target: LoginHelper target: LoginHelper
function onConnected() { function onConnected() {
processed("Loading.qml"); processed("Loading");
} }
} }
@@ -46,6 +46,6 @@ LoginStep {
} }
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: processed("Login.qml") onTriggered: processed("Login")
} }
} }

View File

@@ -47,6 +47,6 @@ LoginStep {
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("Username.qml") onTriggered: root.processed("Username")
} }
} }

View File

@@ -141,7 +141,7 @@ Delegates.RoundedItemDelegate {
} }
function createRoomListContextMenu() { function createRoomListContextMenu() {
const component = Qt.createComponent('org.kde.neochat', 'ContextMenu.qml'); const component = Qt.createComponent('org.kde.neochat', 'ContextMenu');
if (component.status === Component.Error) { if (component.status === Component.Error) {
console.error(component.errorString()); console.error(component.errorString());
} }

View File

@@ -103,7 +103,7 @@ Kirigami.OverlayDrawer {
text: i18n("Room settings") text: i18n("Room settings")
display: QQC2.AbstractButton.IconOnly display: QQC2.AbstractButton.IconOnly
onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: room, room: room,
connection: root.connection connection: root.connection
}, { }, {

View File

@@ -44,7 +44,7 @@ Kirigami.Page {
displayHint: Kirigami.DisplayHint.IconOnly displayHint: Kirigami.DisplayHint.IconOnly
text: i18n("Settings") text: i18n("Settings")
icon.name: "settings-configure" icon.name: "settings-configure"
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories'), {
room: root.room, room: root.room,
connection: root.connection connection: root.connection
}, { }, {

View File

@@ -81,7 +81,7 @@ QQC2.ScrollView {
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RoomSearchPage.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RoomSearchPage'), {
room: root.room room: root.room
}, { }, {
title: i18nc("@action:title", "Search") title: i18nc("@action:title", "Search")
@@ -106,7 +106,7 @@ QQC2.ScrollView {
icon.name: "map-flat" icon.name: "map-flat"
text: i18n("Show locations for this room") text: i18n("Show locations for this room")
onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'LocationsPage.qml'), { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'LocationsPage'), {
room: root.room room: root.room
}, { }, {
title: i18nc("Locations on a map", "Locations") title: i18nc("Locations on a map", "Locations")
@@ -123,7 +123,7 @@ QQC2.ScrollView {
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog.qml').createObject(root.QQC2.ApplicationWindow.window, { Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog').createObject(root.QQC2.ApplicationWindow.window, {
room: root.room room: root.room
}).open(); }).open();
} }
@@ -142,7 +142,7 @@ QQC2.ScrollView {
icon.name: "list-add-user" icon.name: "list-add-user"
onClicked: { onClicked: {
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage.qml'), { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage'), {
room: root.room room: root.room
}, { }, {
title: i18nc("@title", "Invite a User") title: i18nc("@title", "Invite a User")

View File

@@ -186,7 +186,7 @@ Kirigami.Page {
icon.width: Kirigami.Units.gridUnit * 2 icon.width: Kirigami.Units.gridUnit * 2
icon.height: Kirigami.Units.gridUnit * 2 icon.height: Kirigami.Units.gridUnit * 2
onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -215,7 +215,7 @@ Kirigami.Page {
icon.name: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add" icon.name: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add"
text: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in room directory") : i18n("Explore rooms") text: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in room directory") : i18n("Explore rooms")
onTriggered: { onTriggered: {
let dialog = pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.connection, connection: root.connection,
keyword: RoomManager.sortFilterRoomTreeModel.filterText keyword: RoomManager.sortFilterRoomTreeModel.filterText
}, { }, {
@@ -231,7 +231,7 @@ Kirigami.Page {
id: userSearchAction id: userSearchAction
icon.name: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add" icon.name: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add"
text: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in friend directory") : i18n("Find your friends") text: RoomManager.sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in friend directory") : i18n("Find your friends")
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")

View File

@@ -258,7 +258,7 @@ Kirigami.Page {
target: RoomManager target: RoomManager
function onShowEventSource(eventId) { function onShowEventSource(eventId) {
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
sourceText: root.currentRoom.getEventJsonSource(eventId) sourceText: root.currentRoom.getEventJsonSource(eventId)
}, { }, {
title: i18n("Message Source"), title: i18n("Message Source"),
@@ -301,7 +301,7 @@ Kirigami.Page {
} }
function onShowMaximizedCode(author, time, codeText, language) { function onShowMaximizedCode(author, time, codeText, language) {
let popup = Qt.createComponent('org.kde.neochat', 'CodeMaximizeComponent.qml').createObject(QQC2.Overlay.overlay, { let popup = Qt.createComponent('org.kde.neochat', 'CodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
author: author, author: author,
time: time, time: time,
codeText: codeText, codeText: codeText,

View File

@@ -49,7 +49,7 @@ Kirigami.Dialog {
visible: !chosenRoomDelegate.visible visible: !chosenRoomDelegate.visible
text: i18nc("@action:button", "Pick room") text: i18nc("@action:button", "Pick room")
onClicked: { onClicked: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.room.connection, connection: root.room.connection,
showOnlySpaces: true, showOnlySpaces: true,
showOnlySpacesButton: false showOnlySpacesButton: false
@@ -134,7 +134,7 @@ Kirigami.Dialog {
} }
onClicked: { onClicked: {
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage'), {
connection: root.room.connection, connection: root.room.connection,
showOnlySpaces: true, showOnlySpaces: true,
showOnlySpacesButton: false showOnlySpacesButton: false

View File

@@ -60,7 +60,7 @@ Kirigami.Action {
if (id != root.eventId) { if (id != root.eventId) {
return; return;
} }
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "ShareDialog.qml"), { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "ShareDialog"), {
title: root.text, title: root.text,
index: index, index: index,
model: root._instantiator.model model: root._instantiator.model

View File

@@ -60,7 +60,7 @@ QQC2.Control {
source: "notifications" source: "notifications"
} }
onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView.qml'), { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Notifications") title: i18nc("@title", "Notifications")
@@ -275,7 +275,7 @@ QQC2.Control {
contentItem: Kirigami.Icon { contentItem: Kirigami.Icon {
source: "list-add" source: "list-add"
} }
onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
connection: root.connection, connection: root.connection,
isSpace: true, isSpace: true,
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")

View File

@@ -49,7 +49,7 @@ ColumnLayout {
visible: root.currentRoom.canSendState("invite") visible: root.currentRoom.canSendState("invite")
text: i18nc("@button", "Invite user to space") text: i18nc("@button", "Invite user to space")
icon.name: "list-add-user" icon.name: "list-add-user"
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage'), {
room: root.currentRoom room: root.currentRoom
}, { }, {
title: i18nc("@title", "Invite a User") title: i18nc("@title", "Invite a User")
@@ -73,7 +73,7 @@ ColumnLayout {
text: i18nc("@button", "Space settings") text: i18nc("@button", "Space settings")
icon.name: "settings-configure" icon.name: "settings-configure"
display: QQC2.AbstractButton.IconOnly display: QQC2.AbstractButton.IconOnly
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: root.currentRoom, room: root.currentRoom,
connection: root.currentRoom.connection connection: root.currentRoom.connection
}, { }, {
@@ -159,7 +159,7 @@ ColumnLayout {
QtObject { QtObject {
id: _private id: _private
function createRoom(parentId) { function createRoom(parentId) {
let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), { let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
title: i18nc("@title", "Create a Child"), title: i18nc("@title", "Create a Child"),
connection: root.currentRoom.connection, connection: root.currentRoom.connection,
parentId: parentId, parentId: parentId,

View File

@@ -46,7 +46,7 @@ Loader {
QQC2.MenuItem { QQC2.MenuItem {
text: i18nc("'Space' is a matrix space", "Space Settings") text: i18nc("'Space' is a matrix space", "Space Settings")
icon.name: 'settings-configure' icon.name: 'settings-configure'
onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: room, room: room,
connection: connection connection: connection
}, { }, {
@@ -131,7 +131,7 @@ Loader {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
text: i18nc("'Space' is a matrix space", "Space Settings") text: i18nc("'Space' is a matrix space", "Space Settings")
icon.name: 'settings-configure' icon.name: 'settings-configure'
onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings.qml'), { onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'RoomSettings'), {
room: room, room: room,
connection: connection connection: connection
}, { }, {

View File

@@ -22,7 +22,7 @@ LoginStep {
UrlHelper.openUrl(LoginHelper.ssoUrl); UrlHelper.openUrl(LoginHelper.ssoUrl);
} }
function onConnected() { function onConnected() {
processed("Loading.qml"); processed("Loading");
} }
} }
@@ -31,7 +31,7 @@ LoginStep {
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: processed("Login.qml") onTriggered: processed("Login")
} }
nextAction: Kirigami.Action { nextAction: Kirigami.Action {

View File

@@ -33,6 +33,6 @@ LoginStep {
} }
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("Username.qml") onTriggered: root.processed("Username")
} }
} }

View File

@@ -152,7 +152,7 @@ Kirigami.Dialog {
icon.name: "im-ban-user" icon.name: "im-ban-user"
icon.color: Kirigami.Theme.negativeTextColor icon.color: Kirigami.Theme.negativeTextColor
onTriggered: { onTriggered: {
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'BanSheet.qml'), { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'BanSheet'), {
room: root.room, room: root.room,
userId: root.user.id userId: root.user.id
}, { }, {
@@ -210,7 +210,7 @@ Kirigami.Dialog {
icon.name: "delete" icon.name: "delete"
icon.color: Kirigami.Theme.negativeTextColor icon.color: Kirigami.Theme.negativeTextColor
onTriggered: { onTriggered: {
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet'), {
room: root.room, room: root.room,
userId: root.user.id userId: root.user.id
}, { }, {

View File

@@ -55,7 +55,7 @@ RowLayout {
if (button == Qt.RightButton) { if (button == Qt.RightButton) {
accountMenu.open(); accountMenu.open();
} else { } else {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Account editor") title: i18n("Account editor")
@@ -112,7 +112,7 @@ RowLayout {
Kirigami.Action { Kirigami.Action {
text: i18n("Open Settings") text: i18n("Open Settings")
icon.name: "settings-configure" icon.name: "settings-configure"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings.qml'), { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),

View File

@@ -37,11 +37,11 @@ LoginStep {
nextAction: Kirigami.Action { nextAction: Kirigami.Action {
text: Registration.status === Registration.TestingUsername ? i18n("Loading") : null text: Registration.status === Registration.TestingUsername ? i18n("Loading") : null
onTriggered: root.processed("RegisterPassword.qml") onTriggered: root.processed("RegisterPassword")
enabled: Registration.status === Registration.Ready enabled: Registration.status === Registration.Ready
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("Homeserver.qml") onTriggered: root.processed("Homeserver")
} }
} }

View File

@@ -19,7 +19,7 @@ FormCard.FormCardPage {
property bool _showExisting: showExisting && root.currentStepString === root.initialStep property bool _showExisting: showExisting && root.currentStepString === root.initialStep
property alias currentStep: module.item property alias currentStep: module.item
property string currentStepString: initialStep property string currentStepString: initialStep
property string initialStep: "LoginRegister.qml" property string initialStep: "LoginRegister"
signal connectionChosen signal connectionChosen
@@ -136,7 +136,7 @@ FormCard.FormCardPage {
target: currentStep target: currentStep
function onProcessed(nextStep: string): void { function onProcessed(nextStep: string): void {
module.source = nextStep; module.source = nextStep + ".qml";
root.currentStepString = nextStep; root.currentStepString = nextStep;
headerMessage.text = ""; headerMessage.text = "";
headerMessage.visible = false; headerMessage.visible = false;
@@ -167,16 +167,16 @@ FormCard.FormCardPage {
target: Registration target: Registration
function onNextStepChanged() { function onNextStepChanged() {
if (Registration.nextStep === "m.login.recaptcha") { if (Registration.nextStep === "m.login.recaptcha") {
stepConnections.onProcessed("Captcha.qml"); stepConnections.onProcessed("Captcha");
} }
if (Registration.nextStep === "m.login.terms") { if (Registration.nextStep === "m.login.terms") {
stepConnections.onProcessed("Terms.qml"); stepConnections.onProcessed("Terms");
} }
if (Registration.nextStep === "m.login.email.identity") { if (Registration.nextStep === "m.login.email.identity") {
stepConnections.onProcessed("Email.qml"); stepConnections.onProcessed("Email");
} }
if (Registration.nextStep === "loading") { if (Registration.nextStep === "loading") {
stepConnections.onProcessed("Loading.qml"); stepConnections.onProcessed("Loading");
} }
} }
} }
@@ -217,7 +217,7 @@ FormCard.FormCardPage {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Open proxy settings") text: i18nc("@action:button", "Open proxy settings")
icon.name: "settings-configure" icon.name: "settings-configure"
onClicked: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat.settings", "NetworkProxyPage.qml"), {}, { onClicked: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat.settings", "NetworkProxyPage"), {}, {
title: i18nc("@title:window", "Proxy Settings") title: i18nc("@title:window", "Proxy Settings")
}); });
} }

View File

@@ -132,7 +132,7 @@ Kirigami.ApplicationWindow {
}).open(); }).open();
} }
function onExternalUrl(url) { function onExternalUrl(url) {
let dialog = Qt.createComponent("org.kde.neochat", "ConfirmUrlDialog.qml").createObject(applicationWindow()); let dialog = Qt.createComponent("org.kde.neochat", "ConfirmUrlDialog").createObject(applicationWindow());
dialog.link = url; dialog.link = url;
dialog.open(); dialog.open();
} }
@@ -147,7 +147,7 @@ Kirigami.ApplicationWindow {
} }
function openRoomDrawer() { function openRoomDrawer() {
pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomDrawerPage.qml'), { pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomDrawerPage'), {
connection: root.connection connection: root.connection
}); });
} }
@@ -259,7 +259,7 @@ Kirigami.ApplicationWindow {
function onRowsRemoved() { function onRowsRemoved() {
if (AccountRegistry.rowCount() === 0) { if (AccountRegistry.rowCount() === 0) {
pageStack.clear(); pageStack.clear();
pageStack.push(Qt.createComponent('org.kde.neochat', '.qml')); pageStack.push(Qt.createComponent('org.kde.neochat', 'WelcomePage'));
} }
} }
} }
@@ -395,7 +395,7 @@ Kirigami.ApplicationWindow {
Shortcut { Shortcut {
sequence: "Ctrl+Shift+," sequence: "Ctrl+Shift+,"
onActivated: { onActivated: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),
@@ -413,7 +413,7 @@ Kirigami.ApplicationWindow {
} }
} }
function handleShare(): void { function handleShare(): void {
const dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog.qml'), { const dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Share"), title: i18nc("@title", "Share"),
@@ -436,7 +436,7 @@ Kirigami.ApplicationWindow {
function load() { function load() {
pageStack.replace(roomListComponent); pageStack.replace(roomListComponent);
RoomManager.loadInitialRoom(); RoomManager.loadInitialRoom();
let roomPage = pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomPage.qml'), { let roomPage = pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomPage'), {
connection: root.connection connection: root.connection
}); });
roomPage.forceActiveFocus(); roomPage.forceActiveFocus();

View File

@@ -229,7 +229,7 @@ FormCard.FormCardPage {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
id: deactivateAccountButton id: deactivateAccountButton
text: i18n("Deactivate Account") text: i18n("Deactivate Account")
onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ConfirmDeactivateAccountDialog.qml'), { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ConfirmDeactivateAccountDialog'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Confirm Deactivating Account") title: i18nc("@title", "Confirm Deactivating Account")

View File

@@ -29,7 +29,7 @@ FormCard.FormCardPage {
id: accountDelegate id: accountDelegate
required property NeoChatConnection connection required property NeoChatConnection connection
Layout.fillWidth: true Layout.fillWidth: true
onClicked: applicationWindow().pageStack.layers.push('AccountEditorPage.qml', { onClicked: applicationWindow().pageStack.layers.push('AccountEditorPage', {
connection: accountDelegate.connection connection: accountDelegate.connection
}, { }, {
title: i18n("Account editor") title: i18n("Account editor")
@@ -101,7 +101,7 @@ FormCard.FormCardPage {
id: addAccountDelegate id: addAccountDelegate
text: i18n("Add Account") text: i18n("Add Account")
icon.name: "list-add" icon.name: "list-add"
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'WelcomePage.qml')) onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'WelcomePage'))
} }
} }

View File

@@ -221,7 +221,7 @@ FormCard.FormCardPage {
Loader { Loader {
id: colorSchemeDelegate id: colorSchemeDelegate
visible: item !== null visible: item !== null
sourceComponent: Qt.createComponent('org.kde.neochat.settings', 'ColorScheme.qml') sourceComponent: Qt.createComponent('org.kde.neochat.settings', 'ColorScheme')
Layout.fillWidth: true Layout.fillWidth: true
} }
} }

View File

@@ -219,7 +219,7 @@ FormCard.FormCardPage {
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
visible: Config.developerTools visible: Config.developerTools
text: i18n("Open developer tools") text: i18n("Open developer tools")
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage.qml'), { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.devtools', 'DevtoolsPage'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Developer Tools") title: i18n("Developer Tools")