Use formal argument declaration on qml signal handlers

This commit is contained in:
Bart De Vries 2023-09-28 11:02:42 +02:00
parent 184b84f8fd
commit 9525bf075a
7 changed files with 8 additions and 8 deletions

View File

@ -44,11 +44,11 @@ FocusScope {
cursorShape: Qt.SizeVerCursor
onPressed: {
onPressed: (mouse) => {
dragStartOffset = mouse.y
}
onPositionChanged: {
onPositionChanged: (mouse) => {
desktopPlayerControls.handlePositionChanged(mouse.y, dragStartOffset)
}

View File

@ -227,7 +227,7 @@ FocusScope {
anchors.left: parent.left
anchors.right: parent.right
onHandlePositionChanged: {
onHandlePositionChanged: (y, offset) => {
handlePosition = Math.max(0, Math.min(headerBar.maximumHeight, headerBar.height - implicitHeight - offset + y));
settings.headerSize = handlePosition;
}

View File

@ -29,7 +29,7 @@ Kirigami.ScrollablePage {
}
}
Keys.onPressed: {
Keys.onPressed: (event) => {
if (event.matches(StandardKey.Find)) {
searchActionButton.checked = true;
}

View File

@ -28,7 +28,7 @@ Kirigami.ScrollablePage {
title: i18n("Podcast Details")
Keys.onPressed: {
Keys.onPressed: (event) => {
if (event.matches(StandardKey.Find)) {
searchActionButton.checked = true;
}

View File

@ -287,7 +287,7 @@ Kirigami.ScrollablePage {
}
}
Keys.onPressed: {
Keys.onPressed: (event) => {
if (event.matches(StandardKey.SelectAll)) {
feedList.selectionModel.select(model.index(0, 0), ItemSelectionModel.ClearAndSelect | ItemSelectionModel.Columns);
return;

View File

@ -73,7 +73,7 @@ Kirigami.SwipeListItem {
implicitWidth: rowLayout.implicitWidth
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
onClicked: (mouse) => {
// Keep track of (currently) selected items
var modelIndex = listItem.listView.model.index(index, 0);

View File

@ -50,7 +50,7 @@ ListView {
}
}
Keys.onPressed: {
Keys.onPressed: (event) => {
if (event.matches(StandardKey.SelectAll)) {
listView.selectionModel.select(model.index(0, 0), ItemSelectionModel.ClearAndSelect | ItemSelectionModel.Columns);
return;