Skip to content

Commit 86c851e

Browse files
committed
Fix qmllint warnings
1 parent 4f58568 commit 86c851e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/framework/uicomponents/qml/Muse/UiComponents/ButtonBox.qml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ Container {
8181
}
8282

8383
function addButton(text, buttonId, buttonRole, isAccent, isLeftSide) {
84-
const button = Qt.createQmlObject('
85-
import Muse.UiComponents
86-
FlatButton {
87-
}', root)
84+
const button = Qt.createQmlObject("import Muse.UiComponents; FlatButton {}", root)
8885
button.text = text
8986
button.accentButton = isAccent
9087

src/preferences/qml/MuseScore/Preferences/internal/ScrollPagesSection.qml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* You should have received a copy of the GNU General Public License
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
22+
pragma ComponentBehavior: Bound
23+
2224
import QtQuick 2.15
2325
import QtQuick.Controls 2.15
2426

@@ -50,25 +52,27 @@ BaseSection {
5052
]
5153

5254
delegate: RoundedRadioButton {
55+
id: radioButton
5356
leftPadding: 0
5457
spacing: 6
5558

56-
property string title: modelData["title"]
59+
required property string title
60+
required property int value
5761

58-
checked: root.orientation === modelData["value"]
62+
checked: root.orientation === value
5963

6064
navigation.name: "ScrollPagesOrientationButton"
6165
navigation.panel: root.navigation
6266
navigation.row: model.index
6367
navigation.accessible.name: title
6468

6569
StyledTextLabel {
66-
text: title
70+
text: radioButton.title
6771
horizontalAlignment: Text.AlignLeft
6872
}
6973

7074
onToggled: {
71-
root.orientationChangeRequested(modelData["value"])
75+
root.orientationChangeRequested(value)
7276
}
7377
}
7478
}

0 commit comments

Comments
 (0)