smsapp/qml: Define explicit params in signal handlers

This commit is contained in:
Mike Noe 2024-03-11 19:49:45 -04:00
parent 705a72c077
commit 6c777875ff
3 changed files with 4 additions and 4 deletions

View file

@ -76,7 +76,7 @@ Item {
contextMenu.open();
}
}
onPressAndHold: {
onPressAndHold: mouse => {
var selectStart = messageLabel.selectionStart;
var selectEnd = messageLabel.selectionEnd;
selectedText = messageLabel.selectedText;

View file

@ -125,11 +125,11 @@ Kirigami.ScrollablePage
view.currentIndex = 0
filter.forceActiveFocus();
}
Keys.onReturnPressed: {
Keys.onReturnPressed: event => {
event.accepted = true
view.currentItem.startChat()
}
Keys.onEscapePressed: {
Keys.onEscapePressed: event => {
event.accepted = filter.text != ""
filter.text = ""
}

View file

@ -83,7 +83,7 @@ ColumnLayout {
cursorShape: Qt.IBeamCursor
z: 1
}
Keys.onReturnPressed: {
Keys.onReturnPressed: event => {
if (event.key === Qt.Key_Return) {
if (event.modifiers & Qt.ShiftModifier) {
messageField.append("")