Adapt to QTP0001

This commit is contained in:
Tobias Fella
2024-02-22 21:10:50 +01:00
parent e0ba2a179c
commit bc67033c00
43 changed files with 101 additions and 96 deletions

View File

@@ -58,6 +58,9 @@ set_package_properties(Qt6 PROPERTIES
TYPE REQUIRED TYPE REQUIRED
PURPOSE "Basic application components" PURPOSE "Basic application components"
) )
qt_policy(SET QTP0001 NEW)
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme) find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme)
set_package_properties(KF6 PROPERTIES set_package_properties(KF6 PROPERTIES
TYPE REQUIRED TYPE REQUIRED

View File

@@ -250,7 +250,7 @@ int main(int argc, char *argv[])
engine.addImageProvider(QLatin1String("mxc"), MatrixImageProvider::create(&engine, &engine)); engine.addImageProvider(QLatin1String("mxc"), MatrixImageProvider::create(&engine, &engine));
engine.addImageProvider(QLatin1String("blurhash"), new BlurhashImageProvider); engine.addImageProvider(QLatin1String("blurhash"), new BlurhashImageProvider);
engine.load(QUrl(QStringLiteral("qrc:/org/kde/neochat/qml/main.qml"))); engine.load(QUrl(QStringLiteral("qrc:/qt/qml/org/kde/neochat/qml/main.qml")));
if (engine.rootObjects().isEmpty()) { if (engine.rootObjects().isEmpty()) {
return -1; return -1;
} }

View File

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

View File

@@ -20,7 +20,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("qrc:/org/kde/neochat/qml/AccountEditorPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'AccountEditorPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Account editor") title: i18n("Account editor")
@@ -29,7 +29,7 @@ QQC2.Menu {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Notification settings") text: i18n("Notification settings")
icon.name: "notifications" icon.name: "notifications"
onTriggered: pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/SettingsPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'SettingsPage.qml'), {
defaultPage: "notifications", defaultPage: "notifications",
connection: root.connection connection: root.connection
}, { }, {
@@ -41,7 +41,7 @@ QQC2.Menu {
QQC2.MenuItem { QQC2.MenuItem {
text: i18n("Devices") text: i18n("Devices")
icon.name: "computer-symbolic" icon.name: "computer-symbolic"
onTriggered: pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/SettingsPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'SettingsPage.qml'), {
defaultPage: "devices", defaultPage: "devices",
connection: root.connection connection: root.connection
}, { }, {

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: pageStack.layers.push("qrc:/org/kde/neochat/qml/AccountEditorPage.qml", { onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'AccountEditorPage.qml'), {
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: pageStack.layers.push("qrc:/org/kde/neochat/qml/WelcomePage.qml") onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'WelcomePage.qml'))
} }
} }

View File

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

View File

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

View File

@@ -121,7 +121,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('qrc:/org/kde/neochat/qml/Categories.qml', { onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
room: room, room: room,
connection: connection connection: connection
}, { }, {
@@ -195,7 +195,7 @@ Loader {
QQC2.ToolButton { QQC2.ToolButton {
icon.name: 'settings-configure' icon.name: 'settings-configure'
onClicked: { onClicked: {
QQC2.ApplicationWindow.window.pageStack.pushDialogLayer('qrc:/org/kde/neochat/qml/Categories.qml', { QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
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("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
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("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Explore Rooms") title: i18nc("@title", "Explore Rooms")

View File

@@ -94,7 +94,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("qrc:/org/kde/neochat/qml/RemoveSheet.qml", { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {
@@ -117,7 +117,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("qrc:/org/kde/neochat/qml/ReportSheet.qml", { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReportSheet.qml'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {

View File

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

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("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
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("qrc:/org/kde/neochat/qml/UserSearchPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), {
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("qrc:/org/kde/neochat/qml/CreateRoomDialog.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), {
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("qrc:/org/kde/neochat/qml/CreateRoomDialog.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), {
connection: root.connection, connection: root.connection,
isSpace: true, isSpace: true,
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")

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("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
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("qrc:/org/kde/neochat/qml/UserSearchPage.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), {
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("qrc:/org/kde/neochat/qml/CreateRoomDialog.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomPage.qml'), {
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("qrc:/org/kde/neochat/qml/CreateRoomDialog.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), {
connection: root.connection, connection: root.connection,
isSpace: true, isSpace: true,
title: i18nc("@title", "Create a Space") title: i18nc("@title", "Create a Space")

View File

@@ -63,7 +63,7 @@ Item {
} }
ImageParticle { ImageParticle {
source: "qrc:/org/kde/neochat/qml/confetti.png" source: "qrc:/qt/qml/org/kde/neochat/qml/confetti.png"
entryEffect: ImageParticle.Scale entryEffect: ImageParticle.Scale
rotationVariation: 360 rotationVariation: 360
rotationVelocity: 90 rotationVelocity: 90
@@ -211,7 +211,7 @@ Item {
ImageParticle { ImageParticle {
id: fireworksParticleA id: fireworksParticleA
system: fireworksSystem system: fireworksSystem
source: "qrc:/org/kde/neochat/qml/glowdot.png" source: "qrc:/qt/qml/org/kde/neochat/qml/glowdot.png"
alphaVariation: root.isThemeDark ? 0.1 : 0.1 alphaVariation: root.isThemeDark ? 0.1 : 0.1
alpha: root.isThemeDark ? 0.5 : 1 alpha: root.isThemeDark ? 0.5 : 1
groups: ["a"] groups: ["a"]
@@ -222,7 +222,7 @@ Item {
ImageParticle { ImageParticle {
system: fireworksSystem system: fireworksSystem
source: "qrc:/org/kde/neochat/qml/glowdot.png" source: "qrc:/qt/qml/org/kde/neochat/qml/glowdot.png"
color: root.isThemeDark ? "white" : "gold" color: root.isThemeDark ? "white" : "gold"
alphaVariation: root.isThemeDark ? 0.1 : 0.1 alphaVariation: root.isThemeDark ? 0.1 : 0.1
alpha: root.isThemeDark ? 0.5 : 1 alpha: root.isThemeDark ? 0.5 : 1
@@ -235,7 +235,7 @@ Item {
ImageParticle { ImageParticle {
id: fireworksParticleB id: fireworksParticleB
system: fireworksSystem system: fireworksSystem
source: "qrc:/org/kde/neochat/qml/glowdot.png" source: "qrc:/qt/qml/org/kde/neochat/qml/glowdot.png"
alphaVariation: root.isThemeDark ? 0.1 : 0.1 alphaVariation: root.isThemeDark ? 0.1 : 0.1
alpha: root.isThemeDark ? 0.5 : 1 alpha: root.isThemeDark ? 0.5 : 1
groups: ["b"] groups: ["b"]

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("qrc:/org/kde/neochat/qml/RemoveSheet.qml", { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), {
room: currentRoom, room: currentRoom,
eventId: eventId eventId: eventId
}, { }, {

View File

@@ -28,7 +28,7 @@ Labs.MenuBar {
text: i18nc("menu", "Configure NeoChat...") text: i18nc("menu", "Configure NeoChat...")
shortcut: StandardKey.Preferences shortcut: StandardKey.Preferences
onTriggered: pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/SettingsPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'SettingsPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),
@@ -49,7 +49,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("qrc:/org/kde/neochat/qml/UserSearchPage.qml", { onTriggered: pushReplaceLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -67,7 +67,7 @@ Labs.MenuBar {
Labs.MenuItem { Labs.MenuItem {
text: i18nc("menu", "Browse Chats…") text: i18nc("menu", "Browse Chats…")
onTriggered: { onTriggered: {
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
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("qrc:/org/kde/neochat/qml/Username.qml") onTriggered: root.processed("Username.qml")
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("qrc:/org/kde/neochat/qml/LoginRegister.qml") onTriggered: root.processed("LoginRegister.qml")
} }
} }

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("qrc:/org/kde/neochat/qml/LoginMethod.qml"); processed("LoginMethod.qml");
} else if (LoginHelper.supportsSso) { } else if (LoginHelper.supportsSso) {
processed("qrc:/org/kde/neochat/qml/Sso.qml"); processed("Sso.qml");
} else { } else {
processed("qrc:/org/kde/neochat/qml/Password.qml"); processed("Password.qml");
} }
} }
enabled: LoginHelper.homeserverReachable enabled: LoginHelper.homeserverReachable
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: { onTriggered: {
root.processed("qrc:/org/kde/neochat/qml/LoginRegister.qml"); root.processed("LoginRegister.qml");
} }
} }
} }

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("qrc:/org/kde/neochat/qml/Password.qml") onClicked: processed("Password.qml")
} }
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("qrc:/org/kde/neochat/qml/Sso.qml") onClicked: processed("Sso.qml")
} }
} }

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("qrc:/org/kde/neochat/qml/Login.qml") onClicked: root.processed("Login.qml")
} }
FormCard.FormDelegateSeparator {} FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
text: i18nc("@action:button", "Register") text: i18nc("@action:button", "Register")
onClicked: root.processed("qrc:/org/kde/neochat/qml/Homeserver.qml") onClicked: root.processed("Homeserver.qml")
} }
} }

View File

@@ -21,7 +21,7 @@ ColumnLayout {
property QQC2.Action previousAction: null property QQC2.Action previousAction: null
/// Called when switching to the next step. /// Called when switching to the next step.
signal processed(url nextUrl) signal processed(string nextComponent)
/// Show a message in a banner at the top of the page. /// Show a message in a banner at the top of the page.
signal showMessage(string message) signal showMessage(string message)

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("qrc:/org/kde/neochat/qml/ChooseRoomDialog.qml", { let page = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog.qml'), {
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("qrc:/org/kde/neochat/qml/Loading.qml"); processed("Loading.qml");
} }
} }
@@ -46,6 +46,6 @@ LoginStep {
} }
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: processed("qrc:/org/kde/neochat/qml/Login.qml") onTriggered: processed("Login.qml")
} }
} }

View File

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

View File

@@ -63,7 +63,7 @@ ColumnLayout {
model: root.room.accountDataEventTypes model: root.room.accountDataEventTypes
delegate: FormCard.FormButtonDelegate { delegate: FormCard.FormButtonDelegate {
text: modelData text: modelData
onClicked: applicationWindow().pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/MessageSourceSheet.qml", { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), {
"sourceText": root.room.roomAcountDataJson(text) "sourceText": root.room.roomAcountDataJson(text)
}, { }, {
"title": i18n("Event Source"), "title": i18n("Event Source"),
@@ -89,7 +89,7 @@ ColumnLayout {
delegate: FormCard.FormButtonDelegate { delegate: FormCard.FormButtonDelegate {
text: model.type text: model.type
description: model.stateKey description: model.stateKey
onClicked: applicationWindow().pageStack.pushDialogLayer('qrc:/org/kde/neochat/qml/MessageSourceSheet.qml', { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), {
sourceText: stateModel.stateEventJson(stateEventFilterModel.mapToSource(stateEventFilterModel.index(model.index, 0))) sourceText: stateModel.stateEventJson(stateEventFilterModel.mapToSource(stateEventFilterModel.index(model.index, 0)))
}, { }, {
title: i18n("Event Source"), title: i18n("Event Source"),

View File

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

View File

@@ -102,7 +102,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('qrc:/org/kde/neochat/qml/Categories.qml', { onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
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('qrc:/org/kde/neochat/qml/Categories.qml', { onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
room: root.room, room: root.room,
connection: root.connection connection: root.connection
}, { }, {

View File

@@ -82,7 +82,7 @@ QQC2.ScrollView {
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
applicationWindow().pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/DevtoolsPage.qml", { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'DevtoolsPage.qml'), {
room: root.room, room: root.room,
connection: root.connection connection: root.connection
}, { }, {
@@ -100,7 +100,7 @@ QQC2.ScrollView {
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/RoomSearchPage.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RoomSearchPage.qml'), {
room: root.room room: root.room
}, { }, {
title: i18nc("@action:title", "Search") title: i18nc("@action:title", "Search")
@@ -125,7 +125,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("qrc:/org/kde/neochat/qml/LocationsPage.qml", { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'LocationsPage.qml'), {
room: root.room room: root.room
}, { }, {
title: i18nc("Locations on a map", "Locations") title: i18nc("Locations on a map", "Locations")
@@ -147,7 +147,7 @@ QQC2.ScrollView {
icon.name: "list-add-user" icon.name: "list-add-user"
onClicked: { onClicked: {
applicationWindow().pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/InviteUserPage.qml", { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage.qml'), {
room: root.room room: root.room
}, { }, {
title: i18nc("@title", "Invite a User") title: i18nc("@title", "Invite a User")

View File

@@ -207,7 +207,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("qrc:/org/kde/neochat/qml/UserSearchPage.qml", { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")
@@ -236,7 +236,7 @@ Kirigami.Page {
icon.name: sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add" icon.name: sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add"
text: sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in room directory") : i18n("Explore rooms") text: sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in room directory") : i18n("Explore rooms")
onTriggered: { onTriggered: {
let dialog = pageStack.layers.push("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
connection: root.connection, connection: root.connection,
keyword: sortFilterRoomTreeModel.filterText keyword: sortFilterRoomTreeModel.filterText
}, { }, {
@@ -252,7 +252,7 @@ Kirigami.Page {
id: userSearchAction id: userSearchAction
icon.name: sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add" icon.name: sortFilterRoomTreeModel.filterText.length > 0 ? "search" : "list-add"
text: sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in friend directory") : i18n("Find your friends") text: sortFilterRoomTreeModel.filterText.length > 0 ? i18n("Search in friend directory") : i18n("Find your friends")
onTriggered: pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/UserSearchPage.qml", { onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18nc("@title", "Find your friends") title: i18nc("@title", "Find your friends")

View File

@@ -243,7 +243,7 @@ Kirigami.Page {
} }
function onShowEventSource(eventId) { function onShowEventSource(eventId) {
applicationWindow().pageStack.pushDialogLayer('qrc:/org/kde/neochat/qml/MessageSourceSheet.qml', { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet.qml'), {
sourceText: root.currentRoom.getEventJsonSource(eventId) sourceText: root.currentRoom.getEventJsonSource(eventId)
}, { }, {
title: i18n("Message Source"), title: i18n("Message Source"),

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("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
connection: root.room.connection, connection: root.room.connection,
showOnlySpaces: true showOnlySpaces: true
}, { }, {
@@ -133,7 +133,7 @@ Kirigami.Dialog {
} }
onClicked: { onClicked: {
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", { let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ExploreRoomsPage.qml'), {
connection: root.room.connection, connection: root.room.connection,
showOnlySpaces: true showOnlySpaces: true
}, { }, {

View File

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

View File

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

View File

@@ -46,7 +46,7 @@ Kirigami.Page {
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("qrc:/org/kde/neochat/qml/InviteUserPage.qml", { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage.qml'), {
room: root.currentRoom room: root.currentRoom
}, { }, {
title: i18nc("@title", "Invite a User") title: i18nc("@title", "Invite a User")
@@ -70,7 +70,7 @@ Kirigami.Page {
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('qrc:/org/kde/neochat/qml/Categories.qml', { onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
room: root.currentRoom, room: root.currentRoom,
connection: root.currentRoom.connection connection: root.currentRoom.connection
}, { }, {
@@ -158,7 +158,7 @@ Kirigami.Page {
QtObject { QtObject {
id: _private id: _private
function createRoom(parentId) { function createRoom(parentId) {
let dialog = applicationWindow().pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/CreateRoomDialog.qml", { let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog.qml'), {
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

@@ -45,7 +45,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('qrc:/org/kde/neochat/qml/Categories.qml', { onTriggered: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
room: room, room: room,
connection: connection connection: connection
}, { }, {
@@ -130,7 +130,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('qrc:/org/kde/neochat/qml/Categories.qml', { onClicked: QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'Categories.qml'), {
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("qrc:/org/kde/neochat/qml/Loading.qml"); processed("Loading.qml");
} }
} }
@@ -31,7 +31,7 @@ LoginStep {
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: processed("qrc:/org/kde/neochat/qml/Login.qml") onTriggered: processed("Login.qml")
} }
nextAction: Kirigami.Action { nextAction: Kirigami.Action {

View File

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

View File

@@ -148,7 +148,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("qrc:/org/kde/neochat/qml/BanSheet.qml", { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'BanSheet.qml'), {
room: root.room, room: root.room,
userId: root.user.id userId: root.user.id
}, { }, {
@@ -206,7 +206,7 @@ Kirigami.Dialog {
icon.name: "delete" icon.name: "delete"
icon.color: Kirigami.Theme.negativeTextColor icon.color: Kirigami.Theme.negativeTextColor
onTriggered: { onTriggered: {
applicationWindow().pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/RemoveSheet.qml", { applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'RemoveSheet.qml'), {
room: root.room, room: root.room,
userId: root.user.id userId: root.user.id
}, { }, {

View File

@@ -51,7 +51,7 @@ RowLayout {
if (button == Qt.RightButton) { if (button == Qt.RightButton) {
accountMenu.open(); accountMenu.open();
} else { } else {
pageStack.pushDialogLayer(Qt.resolvedUrl('qrc:/org/kde/neochat/qml/AccountEditorPage.qml'), { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'AccountEditorPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Account editor") title: i18n("Account editor")
@@ -120,7 +120,7 @@ RowLayout {
} }
QQC2.ToolButton { QQC2.ToolButton {
icon.name: "settings-configure" icon.name: "settings-configure"
onClicked: pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/SettingsPage.qml", { onClicked: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'SettingsPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),
@@ -187,7 +187,7 @@ RowLayout {
} }
onClicked: { onClicked: {
pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/WelcomePage.qml", {}, { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'WelcomePage.qml'), {}, {
title: i18nc("@title:window", "Login") title: i18nc("@title:window", "Login")
}); });
if (switchUserButton.checked) { if (switchUserButton.checked) {

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("qrc:/org/kde/neochat/qml/RegisterPassword.qml") onTriggered: root.processed("RegisterPassword.qml")
enabled: Registration.status === Registration.Ready enabled: Registration.status === Registration.Ready
} }
previousAction: Kirigami.Action { previousAction: Kirigami.Action {
onTriggered: root.processed("qrc:/org/kde/neochat/qml/Homeserver.qml") onTriggered: root.processed("Homeserver.qml")
} }
} }

View File

@@ -15,9 +15,10 @@ FormCard.FormCardPage {
id: root id: root
property bool showExisting: false property bool showExisting: false
property bool _showExisting: showExisting && module.source == root.initialStep property bool _showExisting: showExisting && root.currentStepString === root.initialStep
property alias currentStep: module.item property alias currentStep: module.item
property string initialStep: "qrc:/org/kde/neochat/qml/LoginRegister.qml" property string currentStepString: initialStep
property string initialStep: "LoginRegister.qml"
signal connectionChosen signal connectionChosen
@@ -127,14 +128,15 @@ FormCard.FormCardPage {
Loader { Loader {
id: module id: module
Layout.fillWidth: true Layout.fillWidth: true
source: root.initialStep sourceComponent: Qt.createComponent('org.kde.neochat', root.initialStep)
Connections { Connections {
id: stepConnections id: stepConnections
target: currentStep target: currentStep
function onProcessed(nextUrl: string): void { function onProcessed(nextStep: string): void {
module.source = nextUrl; module.source = nextStep;
root.currentStepString = nextStep;
headerMessage.text = ""; headerMessage.text = "";
headerMessage.visible = false; headerMessage.visible = false;
if (!module.item.noControls) { if (!module.item.noControls) {
@@ -164,16 +166,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("qrc:/org/kde/neochat/qml/Captcha.qml"); stepConnections.onProcessed("Captcha.qml");
} }
if (Registration.nextStep === "m.login.terms") { if (Registration.nextStep === "m.login.terms") {
stepConnections.onProcessed("qrc:/org/kde/neochat/qml/Terms.qml"); stepConnections.onProcessed("Terms.qml");
} }
if (Registration.nextStep === "m.login.email.identity") { if (Registration.nextStep === "m.login.email.identity") {
stepConnections.onProcessed("qrc:/org/kde/neochat/qml/Email.qml"); stepConnections.onProcessed("Email.qml");
} }
if (Registration.nextStep === "loading") { if (Registration.nextStep === "loading") {
stepConnections.onProcessed("qrc:/org/kde/neochat/qml/Loading.qml"); stepConnections.onProcessed("Loading.qml");
} }
} }
} }

View File

@@ -123,7 +123,7 @@ Kirigami.ApplicationWindow {
target: RoomManager target: RoomManager
function onPushRoom(room, event) { function onPushRoom(room, event) {
root.roomPage = pageStack.push("qrc:/org/kde/neochat/qml/RoomPage.qml", { root.roomPage = pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomPage.qml'), {
connection: root.connection connection: root.connection
}); });
root.roomPage.forceActiveFocus(); root.roomPage.forceActiveFocus();
@@ -133,7 +133,7 @@ Kirigami.ApplicationWindow {
} }
function onPushSpaceHome(room) { function onPushSpaceHome(room) {
root.spaceHomePage = pageStack.push("qrc:/org/kde/neochat/qml/SpaceHomePage.qml"); root.spaceHomePage = pageStack.push(Qt.createComponent('org.kde.neochat', 'SpaceHomePage.qml'));
root.spaceHomePage.forceActiveFocus(); root.spaceHomePage.forceActiveFocus();
} }
@@ -142,7 +142,7 @@ Kirigami.ApplicationWindow {
pageStack.currentIndex = pageStack.depth - 1; pageStack.currentIndex = pageStack.depth - 1;
} else { } else {
pageStack.pop(); pageStack.pop();
root.roomPage = pageStack.push("qrc:/org/kde/neochat/qml/RoomPage.qml", { root.roomPage = pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomPage.qml'), {
connection: root.connection connection: root.connection
}); });
root.spaceHomePage = null; root.spaceHomePage = null;
@@ -158,7 +158,7 @@ Kirigami.ApplicationWindow {
pageStack.currentIndex = pageStack.depth - 1; pageStack.currentIndex = pageStack.depth - 1;
} else { } else {
pageStack.pop(); pageStack.pop();
root.spaceHomePage = pageStack.push("qrc:/org/kde/neochat/qml/SpaceHomePage.qml"); root.spaceHomePage = pageStack.push(Qt.createComponent('org.kde.neochat', 'SpaceHomePage.qml'));
root.roomPage = null; root.roomPage = null;
} }
root.spaceHomePage.forceActiveFocus(); root.spaceHomePage.forceActiveFocus();
@@ -196,7 +196,7 @@ Kirigami.ApplicationWindow {
} }
function openRoomDrawer() { function openRoomDrawer() {
pageStack.push("qrc:/org/kde/neochat/qml/RoomDrawerPage.qml", { pageStack.push(Qt.createComponent('org.kde.neochat', 'RoomDrawerPage.qml'), {
connection: root.connection connection: root.connection
}); });
} }
@@ -305,7 +305,7 @@ Kirigami.ApplicationWindow {
RoomManager.reset(); RoomManager.reset();
pageStack.clear(); pageStack.clear();
roomListLoaded = false; roomListLoaded = false;
pageStack.push("qrc:/org/kde/neochat/qml/WelcomePage.qml"); pageStack.push(Qt.createComponent('org.kde.neochat', '.qml'));
} }
} }
} }
@@ -439,7 +439,7 @@ Kirigami.ApplicationWindow {
Shortcut { Shortcut {
sequence: "Ctrl+Shift+," sequence: "Ctrl+Shift+,"
onActivated: { onActivated: {
pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/SettingsPage.qml", { pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'SettingsPage.qml'), {
connection: root.connection connection: root.connection
}, { }, {
title: i18n("Configure"), title: i18n("Configure"),