From 4c0fea8a38c56249f494d4f53f084a77d368620f Mon Sep 17 00:00:00 2001 From: SeeLook <seelook@gmail.com> Date: Sat, 8 Feb 2025 13:27:54 +0100 Subject: [PATCH] Added missing Nootka.Music import and/or fix JS Connections --- src/qml/level/MelodyPage.qml | 3 ++- src/qml/level/RangePage.qml | 3 ++- src/qml/score/MelodyPreview.qml | 3 ++- src/qml/score/Scordature.qml | 3 ++- src/qml/score/Score.qml | 6 ++---- src/qml/score/ScoreCursor.qml | 4 ++-- src/qml/score/ScoreToolbox.qml | 2 +- src/qml/settings/ScorePage.qml | 3 ++- src/qml/sound/+android/TunerDialog.qml | 7 ++++--- src/qml/sound/NotesDiffBar.qml | 3 ++- src/qml/sound/TunerDialog.qml | 9 ++++----- src/qml/wizard/WizardGuitars.qml | 3 ++- src/qml/wizard/WizardMode.qml | 3 ++- src/qml/wizard/WizardOther.qml | 3 ++- src/qml/wizard/WizardPiano.qml | 3 ++- src/qml/wizard/WizardUkulele.qml | 3 ++- 16 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/qml/level/MelodyPage.qml b/src/qml/level/MelodyPage.qml index fbc0b5ab..3de5dc92 100644 --- a/src/qml/level/MelodyPage.qml +++ b/src/qml/level/MelodyPage.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 import Score 1.0 diff --git a/src/qml/level/RangePage.qml b/src/qml/level/RangePage.qml index 83a0023e..9b29910a 100644 --- a/src/qml/level/RangePage.qml +++ b/src/qml/level/RangePage.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 import Score 1.0 diff --git a/src/qml/score/MelodyPreview.qml b/src/qml/score/MelodyPreview.qml index fb0562f9..ec331dfb 100644 --- a/src/qml/score/MelodyPreview.qml +++ b/src/qml/score/MelodyPreview.qml @@ -4,7 +4,8 @@ import "../" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 TpopupDialog { diff --git a/src/qml/score/Scordature.qml b/src/qml/score/Scordature.qml index 541b57a7..6b03608a 100644 --- a/src/qml/score/Scordature.qml +++ b/src/qml/score/Scordature.qml @@ -3,7 +3,8 @@ * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 Grid { diff --git a/src/qml/score/Score.qml b/src/qml/score/Score.qml index 138e444c..0696ffe0 100644 --- a/src/qml/score/Score.qml +++ b/src/qml/score/Score.qml @@ -100,12 +100,10 @@ Flickable { if (allowAdding) { if (!delControl) delControl = Qt.createComponent("qrc:/score/DelControl.qml").createObject(contentItem); - if (!noteAdd) noteAdd = Qt.createComponent("qrc:/score/NoteAdd.qml").createObject(contentItem); - if (!scoreToobox) - scoreToobox = Qt.createComponent("qrc:/score/ScoreToolbox.qml").createObject(parent); + scoreToobox = Qt.createComponent("qrc:/score/ScoreToolbox.qml").createObject(score); } } @@ -117,7 +115,7 @@ Flickable { }); } if (!scoreToobox && !readOnly) - scoreToobox = Qt.createComponent("qrc:/score/ScoreToolbox.qml").createObject(parent); + scoreToobox = Qt.createComponent("qrc:/score/ScoreToolbox.qml").createObject(score); } onScoreWasCleared: ensureVisible(0, 0) diff --git a/src/qml/score/ScoreCursor.qml b/src/qml/score/ScoreCursor.qml index 910bc957..fb61fea3 100644 --- a/src/qml/score/ScoreCursor.qml +++ b/src/qml/score/ScoreCursor.qml @@ -15,8 +15,8 @@ NoteCursor { // hide cursor after click on a note to show what was selected Connections { target: scoreObj - onClicked: allow = false - onActiveYposChanged: allow = scoreObj.activeYpos > 0 + function onClicked() : void { allow = false } + function onActiveYposChanged() : void { allow = scoreObj.activeYpos > 0 } } } diff --git a/src/qml/score/ScoreToolbox.qml b/src/qml/score/ScoreToolbox.qml index 0346127d..ad6121b9 100644 --- a/src/qml/score/ScoreToolbox.qml +++ b/src/qml/score/ScoreToolbox.qml @@ -118,7 +118,7 @@ ControlBase { Connections { target: item - function onClicked : void { + function onClicked() : void { scoreObj.workRtmValue = item.rhythm; scoreObj.workRtmRest = item.rest; } diff --git a/src/qml/settings/ScorePage.qml b/src/qml/settings/ScorePage.qml index c0b99019..4e3a48e2 100644 --- a/src/qml/settings/ScorePage.qml +++ b/src/qml/settings/ScorePage.qml @@ -4,7 +4,8 @@ import "../" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 import QtQuick.Layouts import Score 1.0 diff --git a/src/qml/sound/+android/TunerDialog.qml b/src/qml/sound/+android/TunerDialog.qml index 12aaee7e..396eb285 100644 --- a/src/qml/sound/+android/TunerDialog.qml +++ b/src/qml/sound/+android/TunerDialog.qml @@ -2,7 +2,8 @@ * Copyright (C) 2018-2021 by Tomasz Bojczuk (seelook@gmail.com) * * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 import Nootka 1.0 @@ -268,7 +269,7 @@ TtunerDialogItem { Connections { target: SOUND - onVolumeUpPressed: volSlider.value++ - onVolumeDownPressed: volSlider.value-- + function onVolumeUpPressed() : void { volSlider.value++ } + function onVolumeDownPressed() : void { volSlider.value-- } } } diff --git a/src/qml/sound/NotesDiffBar.qml b/src/qml/sound/NotesDiffBar.qml index b4ee49ea..584a7193 100644 --- a/src/qml/sound/NotesDiffBar.qml +++ b/src/qml/sound/NotesDiffBar.qml @@ -4,7 +4,8 @@ import "../" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 TnotesBarItem { diff --git a/src/qml/sound/TunerDialog.qml b/src/qml/sound/TunerDialog.qml index 72d9f22a..10a68194 100644 --- a/src/qml/sound/TunerDialog.qml +++ b/src/qml/sound/TunerDialog.qml @@ -6,7 +6,8 @@ import "../" import "../settings" import Nootka 1.0 import Nootka.Dialogs 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 TtunerDialogItem { @@ -312,15 +313,13 @@ TtunerDialogItem { Connections { target: SOUND - onVolumeUpPressed: { + function onVolumeUpPressed() : void { if (NOO.isAndroid()) volSlider.value++; - } - onVolumeDownPressed: { + function onVolumeDownPressed() : void { if (NOO.isAndroid()) volSlider.value--; - } } diff --git a/src/qml/wizard/WizardGuitars.qml b/src/qml/wizard/WizardGuitars.qml index 83b3095f..37adede0 100644 --- a/src/qml/wizard/WizardGuitars.qml +++ b/src/qml/wizard/WizardGuitars.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 Column { diff --git a/src/qml/wizard/WizardMode.qml b/src/qml/wizard/WizardMode.qml index 993e9f90..0ae41d78 100644 --- a/src/qml/wizard/WizardMode.qml +++ b/src/qml/wizard/WizardMode.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import QtQuick.Controls 2.12 import Score 1.0 diff --git a/src/qml/wizard/WizardOther.qml b/src/qml/wizard/WizardOther.qml index 099a41e2..6486d672 100644 --- a/src/qml/wizard/WizardOther.qml +++ b/src/qml/wizard/WizardOther.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 Column { diff --git a/src/qml/wizard/WizardPiano.qml b/src/qml/wizard/WizardPiano.qml index 6929859f..3cb9a1ce 100644 --- a/src/qml/wizard/WizardPiano.qml +++ b/src/qml/wizard/WizardPiano.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 Column { diff --git a/src/qml/wizard/WizardUkulele.qml b/src/qml/wizard/WizardUkulele.qml index 866edf2a..303e41f0 100644 --- a/src/qml/wizard/WizardUkulele.qml +++ b/src/qml/wizard/WizardUkulele.qml @@ -5,7 +5,8 @@ import "../" import "../score" import Nootka 1.0 -import QtQuick 2.12 +import QtQuick +import Nootka.Music import Score 1.0 Column { -- GitLab