diff --git a/src/qml/MainScore.qml b/src/qml/MainScore.qml index ad40282981f02dcc6b2f0f481a3149a7954ebb46..636de29a00315e50a683c32765684a4867154b39 100644 --- a/src/qml/MainScore.qml +++ b/src/qml/MainScore.qml @@ -170,7 +170,7 @@ Score { Connections { target: SOUND - onInitialized: { + function onInitialized() : void { mainObj.scoreObject = scoreObj; singleNote = Qt.binding(function() { return GLOB.singleNoteMode; @@ -193,12 +193,12 @@ Score { Connections { target: GLOB - onClefTypeChanged: score.clef = GLOB.clefType + function onClefTypeChanged() : void { score.clef = GLOB.clefType } } Connections { target: GLOB.tuning - onScordatureChanged: updateScord() + function onScordatureChanged() : void { updateScord() } } // note highlight diff --git a/src/qml/MainWindow.qml b/src/qml/MainWindow.qml index c5d9d4527fb9398dc05979e623e7cccd8da0a176..ded6cd7d18d7ce1b71d874b4fc1729aeb2f8411c 100644 --- a/src/qml/MainWindow.qml +++ b/src/qml/MainWindow.qml @@ -157,12 +157,10 @@ ApplicationWindow { height: parent.height / (GLOB.singleNoteMode && topToBott ? 2 : 1) width: parent.width / (GLOB.singleNoteMode && !topToBott ? 2 : 1) } - } Instrument { id: instrument - score: score } diff --git a/src/qml/instruments/Guitar.qml b/src/qml/instruments/Guitar.qml index c51e9ea418e69b763acf2c8734baa01b72d8a6a1..ec57e2ce2b915ec4da310e08a2afb83cf2618eda 100644 --- a/src/qml/instruments/Guitar.qml +++ b/src/qml/instruments/Guitar.qml @@ -130,7 +130,7 @@ TguitarBg { Connections { target: instrFlick enabled: !NOO.isAndroid() - onMovementEnded: instrument.pressedAt(0, 0) + function onMovementEnded() : void { instrument.pressedAt(0, 0) } } MouseArea { diff --git a/src/qml/instruments/Instrument.qml b/src/qml/instruments/Instrument.qml index 0f529fbdff59a484b2d10e21fc9ee554ad7b2dba..481136ea67d54faf1544a63a7adfab60f0ad1d09 100644 --- a/src/qml/instruments/Instrument.qml +++ b/src/qml/instruments/Instrument.qml @@ -52,13 +52,13 @@ Flickable { Connections { target: GLOB - onInstrumentChanged: setInstrument() + function onInstrumentChanged() : void { setInstrument() } } Connections { target: score enabled: GLOB.instrument.piano - onClefChanged: instrument.setAmbitus(score.scoreObj.lowestNote(), score.scoreObj.highestNote()) + function onClefChanged() : void { instrument.setAmbitus(score.scoreObj.lowestNote(), score.scoreObj.highestNote()) } } } diff --git a/src/qml/score/Clef.qml b/src/qml/score/Clef.qml index 4f7901250b89ceae2e8b9e1a1e45342a3589d158..5e9eacb2a7c0e7a5dc79ba133d96fa38f6ea7b39 100644 --- a/src/qml/score/Clef.qml +++ b/src/qml/score/Clef.qml @@ -91,7 +91,7 @@ Text { Connections { target: score - onClefChanged: getPos() + function onClefChanged() : void { getPos() } } } diff --git a/src/qml/score/DelControl.qml b/src/qml/score/DelControl.qml index de1c42562b77733e1d944e6804f6fce21df23642..4dbc9c42af019b21b769e5ea75dcaa884bd564d0 100644 --- a/src/qml/score/DelControl.qml +++ b/src/qml/score/DelControl.qml @@ -17,8 +17,8 @@ ControlBase { Connections { target: scoreObj enabled: !scoreObj.singleNote && scoreObj.allowAdding && !scoreObj.readOnly - onEditModeChanged: delControl.show = scoreObj.editMode && activeItem - onActiveNoteChanged: { + function onEditModeChanged() : void { delControl.show = scoreObj.editMode && activeItem } + function onActiveNoteChanged() : void { if (scoreObj.activeNote) { if (!scoreObj.readOnly && activeItem != scoreObj.activeNote) { activeItem = scoreObj.activeNote; @@ -30,7 +30,7 @@ ControlBase { delControl.active = false; } } - onScoreWasCleared: show = false + function onScoreWasCleared() : void { show = false } } GlowRect { @@ -94,18 +94,14 @@ ControlBase { Component.onCompleted: { if (scoreObj.deleteNoteAct) statusTip = scoreObj.deleteNoteAct.text + ".<br><b>(" + scoreObj.deleteNoteAct.key() + ")</b>"; - } font { family: "Nootka" pixelSize: factor * 3 } - } - } - } } diff --git a/src/qml/score/Meter.qml b/src/qml/score/Meter.qml index 01e18cf098bc5dd8fd97ab7c882f300c9fd4000f..46da92381dc5dcb5642957bab7ef4954fdc40fa3 100644 --- a/src/qml/score/Meter.qml +++ b/src/qml/score/Meter.qml @@ -18,7 +18,7 @@ Text { Connections { target: score - onMeterChanged: text = NOO.meter(score.meter).symbol() + function onMeterChanged() : void { text = NOO.meter(score.meter).symbol() } } font { diff --git a/src/qml/score/ScoreToolbox.qml b/src/qml/score/ScoreToolbox.qml index a767b3a1fe9ebfa05183e23aef6cba50f10d806d..0346127dbd8484f67686b0ef8e4e6ea655167a33 100644 --- a/src/qml/score/ScoreToolbox.qml +++ b/src/qml/score/ScoreToolbox.qml @@ -55,8 +55,8 @@ ControlBase { Connections { target: scoreObj - onScoreWasCleared: show = false - onEditModeChanged: show = scoreObj.editMode && scoreObj.activeNote + function onScoreWasCleared() : void { show = false } + function onEditModeChanged() : void { show = scoreObj.editMode && scoreObj.activeNote } } component: Component { @@ -86,11 +86,8 @@ ControlBase { family: "scorek" pixelSize: factor * 3 } - } - } - } Rectangle { @@ -116,20 +113,17 @@ ControlBase { var act = rtmActions[Math.floor(index / 2)]; if (act) item.statusTip = act.text + "<br><b>(" + act.key() + ")</b>"; - } } Connections { target: item - onClicked: { + function onClicked : void { scoreObj.workRtmValue = item.rhythm; scoreObj.workRtmRest = item.rest; } } - } - } // triplet @@ -165,7 +159,6 @@ ControlBase { item.text = "."; if (scoreObj.dotNoteAct) item.statusTip = scoreObj.dotNoteAct.text + "<br><b>(" + scoreObj.dotNoteAct.key() + ")</b>"; - } Binding { @@ -182,9 +175,8 @@ ControlBase { Connections { target: dotLoad.item - onClicked: scoreObj.workRtmDot = !scoreObj.workRtmDot + function onClicked() : void { scoreObj.workRtmDot = !scoreObj.workRtmDot } } - } } diff --git a/src/qml/score/Staff.qml b/src/qml/score/Staff.qml index 5aae6a06d4f2c482df69b5dcb1cb0ae871367a16..7cd8298a90006c953d68f5902127fb60d51644c7 100644 --- a/src/qml/score/Staff.qml +++ b/src/qml/score/Staff.qml @@ -94,7 +94,7 @@ TstaffItem { Connections { target: score - onEnableKeySignChanged: checkIsKeyEnabled() + function onEnableKeySignChanged() : void { checkIsKeyEnabled() } } // measure number diff --git a/src/qml/shared/HeadButton.qml b/src/qml/shared/HeadButton.qml index d2b3f95480b95ca1e89c7527f617b8a46944f83a..d771b167e042d24539c9abe9dbc6846ed93a89d8 100644 --- a/src/qml/shared/HeadButton.qml +++ b/src/qml/shared/HeadButton.qml @@ -84,7 +84,7 @@ ToolButton { Connections { target: taction - onShakeButton: shakeAnim.running = true + function onShakeButton() : void { shakeAnim.running = true } } SequentialAnimation { @@ -116,10 +116,8 @@ ToolButton { to: 0 duration: 50 } - } background: Item { } - } diff --git a/src/qml/sound/TempoBar.qml b/src/qml/sound/TempoBar.qml index 276abf656e0b270d192f7a9579c838bcbda13fd5..0b1b037159c1a259e76c8b395f1d6e3fa7fd7fc6 100644 --- a/src/qml/sound/TempoBar.qml +++ b/src/qml/sound/TempoBar.qml @@ -210,7 +210,7 @@ Item { Connections { target: SOUND - onCountdownPrepare: { + function onCountdownPrepare() : void { if (SOUND.tickBeforePlay && !GLOB.singleNoteMode) { if (!preCountItem) { var d = Qt.createComponent("qrc:/sound/CountdownItem.qml");