Call signals instead of signal handlers

Directly calling signals is the supported way to send signals.
Calling signal handlers worked in the past, but will be phased out in
the future (https://bugreports.qt.io/browse/QTBUG-120573).
This commit is contained in:
Yifan Zhu 2024-01-10 09:29:10 -08:00
parent 3f97274b4a
commit 784b2853ca
2 changed files with 2 additions and 2 deletions

View file

@ -163,7 +163,7 @@ Kirigami.ScrollablePage
Shortcut { Shortcut {
sequence: "Ctrl+N" sequence: "Ctrl+N"
onActivated: newButton.onClicked() onActivated: newButton.clicked()
} }
} }
} }

View file

@ -88,7 +88,7 @@ ColumnLayout {
if (event.modifiers & Qt.ShiftModifier) { if (event.modifiers & Qt.ShiftModifier) {
messageField.append("") messageField.append("")
} else { } else {
sendButton.onClicked() sendButton.clicked()
event.accepted = true event.accepted = true
} }
} }