Add explicit signal argument

This commit is contained in:
Laurent Montel
2023-09-07 08:15:11 +02:00
committed by Tobias Fella
parent 65da416b8e
commit 597633f824

View File

@@ -217,7 +217,7 @@ QQC2.Control {
quickFormatBar.close() quickFormatBar.close()
} }
} }
Keys.onEnterPressed: { Keys.onEnterPressed: event => {
if (completionMenu.visible) { if (completionMenu.visible) {
completionMenu.complete() completionMenu.complete()
} else if (event.modifiers & Qt.ShiftModifier || Kirigami.Settings.isMobile) { } else if (event.modifiers & Qt.ShiftModifier || Kirigami.Settings.isMobile) {
@@ -226,7 +226,7 @@ QQC2.Control {
root.postMessage(); root.postMessage();
} }
} }
Keys.onReturnPressed: { Keys.onReturnPressed: event => {
if (completionMenu.visible) { if (completionMenu.visible) {
completionMenu.complete() completionMenu.complete()
} else if (event.modifiers & Qt.ShiftModifier || Kirigami.Settings.isMobile) { } else if (event.modifiers & Qt.ShiftModifier || Kirigami.Settings.isMobile) {
@@ -261,7 +261,7 @@ QQC2.Control {
} }
} }
} }
Keys.onShortcutOverride: { Keys.onShortcutOverride: event => {
// Accept the event only when there was something to cancel. Otherwise, let the event go to the RoomPage. // Accept the event only when there was something to cancel. Otherwise, let the event go to the RoomPage.
if (cancelButton.visible && event.key === Qt.Key_Escape) { if (cancelButton.visible && event.key === Qt.Key_Escape) {
cancelButton.action.trigger(); cancelButton.action.trigger();