Port away from implicitly defined onFoo properties in Connections
This commit is contained in:
@@ -111,7 +111,9 @@ RowLayout {
|
||||
}
|
||||
Connections {
|
||||
target: replyLoader.item
|
||||
onClicked: replyClicked(reply.eventId)
|
||||
function onClicked() {
|
||||
replyClicked(reply.eventId)
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
|
||||
@@ -72,7 +72,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
Connections {
|
||||
target: Controller
|
||||
onErrorOccured: {
|
||||
function onErrorOccured(error, detail) {
|
||||
inlineMessage.type = Kirigami.MessageType.Error;
|
||||
if (detail && detail.length !== 0) {
|
||||
inlineMessage.text = i18n("%1: %2", error, detail);
|
||||
|
||||
18
qml/main.qml
18
qml/main.qml
@@ -209,7 +209,7 @@ Kirigami.ApplicationWindow {
|
||||
Connections {
|
||||
target: Controller
|
||||
|
||||
onInitiated: {
|
||||
function onInitiated() {
|
||||
if (Controller.accountCount === 0) {
|
||||
pageStack.replace("qrc:/imports/NeoChat/Page/LoginPage.qml", {});
|
||||
} else {
|
||||
@@ -218,24 +218,30 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
onConnectionAdded: {
|
||||
function onConnectionAdded() {
|
||||
if (Controller.accountCount === 1) {
|
||||
roomManager.roomList = pageStack.replace(roomListComponent);
|
||||
}
|
||||
}
|
||||
|
||||
onConnectionDropped: {
|
||||
function onConnectionDropped() {
|
||||
if (Controller.accountCount === 0) {
|
||||
pageStack.clear();
|
||||
pageStack.replace("qrc:/imports/NeoChat/Page/LoginPage.qml");
|
||||
}
|
||||
}
|
||||
|
||||
onGlobalErrorOccured: showPassiveNotification(error + ": " + detail)
|
||||
function onGlobalErrorOccured(error, detail) {
|
||||
showPassiveNotification(error + ": " + detail)
|
||||
}
|
||||
|
||||
onShowWindow: root.showWindow()
|
||||
function onShowWindow() {
|
||||
root.showWindow()
|
||||
}
|
||||
|
||||
onOpenRoom: roomManager.enterRoom(room)
|
||||
function onOpenRoom(room) {
|
||||
roomManager.enterRoom(room)
|
||||
}
|
||||
}
|
||||
|
||||
RoomListModel {
|
||||
|
||||
Reference in New Issue
Block a user