From d12ed2129c6e1ff1890edd6c28a65b5976af8b01 Mon Sep 17 00:00:00 2001
From: SeeLook <seelook@gmail.com>
Date: Mon, 10 Feb 2025 18:25:50 +0100
Subject: [PATCH] Fixed JS syntax for signal handler with argument

---
 src/qml/level/LevelPreview.qml   | 2 +-
 src/qml/nootini/AudioAnalyze.qml | 2 +-
 src/qml/score/KeySignature.qml   | 4 ++--
 src/qml/score/Staff.qml          | 1 -
 src/qml/sound/TempoBar.qml       | 7 +++----
 src/qml/sound/TempoMenu.qml      | 6 ++++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/qml/level/LevelPreview.qml b/src/qml/level/LevelPreview.qml
index 06b5be00..5acf0d43 100644
--- a/src/qml/level/LevelPreview.qml
+++ b/src/qml/level/LevelPreview.qml
@@ -51,7 +51,7 @@ TlevelPreviewItem {
             // HACK: keeping MouseArea inside PinchArea makes it working
             MouseArea {
                 anchors.fill: parent
-                onWheel: {
+                onWheel: wheel => {
                     if (wheel.modifiers & Qt.ControlModifier) {
                         if (wheel.angleDelta.y > 0)
                             zoom(true);
diff --git a/src/qml/nootini/AudioAnalyze.qml b/src/qml/nootini/AudioAnalyze.qml
index 90ea71ec..ac210cb7 100644
--- a/src/qml/nootini/AudioAnalyze.qml
+++ b/src/qml/nootini/AudioAnalyze.qml
@@ -48,7 +48,7 @@ TaudioAnalyzeItem {
 
         MouseArea {
             anchors.fill: parent
-            onWheel: {
+            onWheel: wheel => {
                 if (wheel.modifiers & Qt.ControlModifier) {
                     if (wheel.angleDelta.y > 0)
                         sc *= 1.0625;
diff --git a/src/qml/score/KeySignature.qml b/src/qml/score/KeySignature.qml
index a8b073e6..7925fa13 100644
--- a/src/qml/score/KeySignature.qml
+++ b/src/qml/score/KeySignature.qml
@@ -16,7 +16,7 @@ Item {
     readonly property var flatPos: [4, 1, 5, 2, 6, 3, 7]
 
     function accidOffset(c) {
-        var accidOff = 1;
+        let accidOff = 1;
         switch (c) {
         case Tclef.Bass_F:
         case Tclef.Bass_F_8down:
@@ -134,7 +134,7 @@ Item {
                 else
                     keyDown();
             }
-            onWheel: {
+            onWheel: wheel => {
                 if (wheel.angleDelta.y > 0)
                     deltaUp();
                 else if (wheel.angleDelta.y < 0)
diff --git a/src/qml/score/Staff.qml b/src/qml/score/Staff.qml
index 7cd8298a..e1beef81 100644
--- a/src/qml/score/Staff.qml
+++ b/src/qml/score/Staff.qml
@@ -5,7 +5,6 @@
 import Nootka 1.0
 import Nootka.Music
 import QtQuick 2.12
-import QtQuick.Controls 2.12
 import QtQuick.Window 2.12
 import Score 1.0
 
diff --git a/src/qml/sound/TempoBar.qml b/src/qml/sound/TempoBar.qml
index 0b1b0371..7a229c6e 100644
--- a/src/qml/sound/TempoBar.qml
+++ b/src/qml/sound/TempoBar.qml
@@ -48,7 +48,7 @@ Item {
                     }
                     tMenu.open();
                 }
-                onWheel: {
+                onWheel: wheel => {
                     if (!SOUND.metroRunning) {
                         if (wheel.angleDelta.y > 0)
                             SOUND.tempo = SOUND.tempo + (wheel.modifiers & Qt.ControlModifier ? 10 : 1);
@@ -210,11 +210,10 @@ Item {
 
     Connections {
         target: SOUND
-        function onCountdownPrepare() : void {
+        function onCountdownPrepare(tickCount) : void {
             if (SOUND.tickBeforePlay && !GLOB.singleNoteMode) {
                 if (!preCountItem) {
-                    var d = Qt.createComponent("qrc:/sound/CountdownItem.qml");
-                    preCountItem = d.createObject(score);
+                    preCountItem = Qt.createComponent("qrc:/sound/CountdownItem.qml").createObject(score);
                 }
                 preCountItem.tickCount = tickCount;
                 preCountItem.counter = 1;
diff --git a/src/qml/sound/TempoMenu.qml b/src/qml/sound/TempoMenu.qml
index b308ffd6..4846512b 100644
--- a/src/qml/sound/TempoMenu.qml
+++ b/src/qml/sound/TempoMenu.qml
@@ -95,7 +95,7 @@ Popup {
                 MouseArea {
                     anchors.fill: parent
                     z: -1
-                    onWheel: {
+                    onWheel: wheel => {
                         var ci = buTumb.currentIndex;
                         if (wheel.angleDelta.y > 0)
                             ci--;
@@ -282,7 +282,7 @@ Popup {
             enabled: !executor
 
             ButtonGroup {
-                buttons: radioRow.children
+                id: quantGr
             }
 
             MouseArea {
@@ -321,6 +321,7 @@ Popup {
                     text: "G"
                     textScale: 2
                     checked: SOUND.quantization === 6
+                    ButtonGroup.group: quantGr
                     onClicked: SOUND.quantization = 6
                     onHoveredChanged: NOO.setStatusTip(hovered ? quantTip : "", Item.TopLeft)
 
@@ -336,6 +337,7 @@ Popup {
                     text: "F"
                     textScale: 2
                     checked: SOUND.quantization === 12
+                    ButtonGroup.group: quantGr
                     onClicked: SOUND.quantization = 12
                     onHoveredChanged: NOO.setStatusTip(hovered ? quantTip : "", Item.TopLeft)
 
-- 
GitLab