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