diff --git a/src/app/qml/AccountSwitchDialog.qml b/src/app/qml/AccountSwitchDialog.qml index e2507b7d9..785e61d3d 100644 --- a/src/app/qml/AccountSwitchDialog.qml +++ b/src/app/qml/AccountSwitchDialog.qml @@ -61,7 +61,7 @@ Kirigami.Dialog { } onClicked: { - pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'), {}, { + ((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'), {}, { title: i18nc("@title:window", "Login") }); root.close(); @@ -95,8 +95,8 @@ Kirigami.Dialog { accountView.decrementCurrentIndex(); } } - Keys.onEnterPressed: (accountView.currentItem as Delegates.RoundedItemDelegate ?? accountView.footerItem).clicked() - Keys.onReturnPressed: (accountView.currentItem as Delegates.RoundedItemDelegate ?? accountView.footerItem).clicked() + Keys.onEnterPressed: ((accountView.currentItem ?? accountView.footerItem) as Delegates.RoundedItemDelegate).clicked() + Keys.onReturnPressed: ((accountView.currentItem ?? accountView.footerItem) as Delegates.RoundedItemDelegate).clicked() onVisibleChanged: { for (let i = 0; i < accountView.count; i++) {