Skip to content

Commit

Permalink
Fixed qml warnings after migrate to qt 5.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Eism authored and igorkorsukov committed Oct 9, 2020
1 parent c183ab2 commit 72ca0c3
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 43 deletions.
2 changes: 1 addition & 1 deletion framework/ui/qml/MuseScore/Ui/InteractiveProvider.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Item {
Connections {
target: root.provider

onFireOpen: {
function onFireOpen(data) {

var page = data.data()
console.log("try open uri: " + data.value("uri") + ", page: " + JSON.stringify(page))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Layouts 1.3

import MuseScore.Ui 1.0

Rectangle {
Expand All @@ -13,31 +15,21 @@ Rectangle {
name: "HORIZONTAL"
when: orientation == Qt.Horizontal

AnchorChanges {
target: root
anchors.left: parent.left
anchors.right: parent.right
}

PropertyChanges {
target: root
height: 1
Layout.fillWidth: true
}
},

State {
name: "VERTICAL"
when: orientation == Qt.Vertical

AnchorChanges {
target: root
anchors.top: parent.top
anchors.bottom: parent.bottom
}

PropertyChanges {
target: root
width: 1
Layout.fillHeight: true
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TabView {
Connections {
target: root

onCurrentIndexChanged: {
function onCurrentIndexChanged(currentIndex) {
if (currentIndex < 0)
return

Expand Down
4 changes: 2 additions & 2 deletions mu4/appshell/qml/DevTools/Audio/SynthSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ Rectangle {

Connections {
target: settingsModel
onSelectedChanged: {
function onSelectedChanged(name) {
if (name === "Zerberus") {
zerberusPanel.selectedSoundFonts = []
zerberusPanel.selectedSoundFonts = settingsModel.selectedSoundFonts("Zerberus")
}
}

onAvalaibleChanged: {
function onAvalaibleChanged(name) {
if (name === "Zerberus") {
zerberusPanel.avalaibleSoundFonts = []
zerberusPanel.avalaibleSoundFonts = settingsModel.avalaibleSoundFonts("Zerberus")
Expand Down
4 changes: 3 additions & 1 deletion mu4/appshell/qml/Settings/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ DockPage {

Connections {
target: loader.item
onChanged: settingsModel.changeVal(model.index, newVal)
function onChanged(newVal) {
settingsModel.changeVal(model.index, newVal)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Rectangle {
Connections {
target: instrumentsModel

onSelectedFamilyChanged: {
function onSelectedFamilyChanged(family) {
familyView.setFamily(family)
}
}
Expand Down Expand Up @@ -111,7 +111,7 @@ Rectangle {

Column {
Layout.preferredWidth: 30
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter

spacing: 12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Item {

Connections {
target: privateProperties
onCurrentInstrumentIndexChanged: {
function onCurrentInstrumentIndexChanged() {
if (privateProperties.currentInstrumentIndex == index) {
item.resetCurrentInstrument()
}
Expand Down
4 changes: 2 additions & 2 deletions mu4/languages/qml/MuseScore/Languages/LanguagesPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ Item {

Connections {
target: languageListModel
onProgress: {
function onProgress(status, indeterminate, current, total) {
languageInfo.setProgress(status, indeterminate, current, total)
}
onFinish: {
function onFinish() {
languageInfo.resetProgress()
}
}
Expand Down
4 changes: 0 additions & 4 deletions mu4/userscores/qml/MuseScore/UserScores/NewScoreDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@ QmlDialog {

ChooseInstrumentsAndTemplatesPage {
id: instrumentsAndTemplatePage

anchors.fill: parent
}

ScoreInfoPage {
id: scoreInfoPage

anchors.fill: parent
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ Item {

ChooseInstrumentsPage {
id: instrumentsPage

anchors.fill: parent
}

ChooseTemplatePage {
id: templatePage

anchors.fill: parent
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ GridView {

property var currentSignature: null

anchors.left: parent.left
anchors.right: parent.right

height: contentHeight

clip: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FlatButton {
StyledPopup {
id: popup

implicitHeight: column.implicitHeight + topPadding + bottomPadding + 40
implicitHeight: 300
implicitWidth: 724

arrowX: root.arrowX
Expand Down Expand Up @@ -95,8 +95,6 @@ FlatButton {
anchors.left: parent.left
anchors.right: parent.right

height: childrenRect.height

currentIndex: bar.currentIndex

KeySignatureListView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,16 @@ Item {
AdditionalInfoView {
id: additionalInfo

anchors.left: parent.left
anchors.right: parent.right

Layout.preferredHeight: 150
Layout.fillWidth: true
}

SeparatorLine { }

GeneralInfoView {
id: generalInfo

anchors.left: parent.left
anchors.right: parent.right
Layout.fillWidth: true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FlatButton {
Connections {
target: model

onTimeSignatureChanged: {
function onTimeSignatureChanged(timeSignature) {
timeSignatureView.numerator = model.musicSymbolCodes(timeSignature.numerator)
timeSignatureView.denominator = model.musicSymbolCodes(timeSignature.denominator)
}
Expand Down

0 comments on commit 72ca0c3

Please sign in to comment.