Skip to content

Commit

Permalink
Merge pull request #10929 from Holzhaus/qmlformat-pre-commit-pinned
Browse files Browse the repository at this point in the history
[RFC] Migrate from `qmlformat` to `qml_formatter`
  • Loading branch information
daschuer committed Jan 19, 2023
2 parents 89f5860 + 7ec6d21 commit fa06c46
Show file tree
Hide file tree
Showing 48 changed files with 38 additions and 232 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
# The Dockerfile for this container can be found at:
# https://github.com/Holzhaus/mixxx-ci-docker
container: holzhaus/mixxx-ci:20220805
container: holzhaus/mixxx-ci:20220930
steps:
- name: "Check out repository"
uses: actions/checkout@v3
Expand Down
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Expand Up @@ -26,8 +26,10 @@

# _anlz.h/_pdb.h: Header files generated by Kaitai Struct
exclude: ^(lib/|src/test/.*data/).*|res/translations/.*\.ts|src/.*_(anlz|pdb)\.h$
minimum_pre_commit_version: 2.21.0
default_language_version:
python: python3
rust: 1.64.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
Expand Down Expand Up @@ -116,6 +118,10 @@ repos:
hooks:
- id: prettier
types: [yaml]
- repo: https://github.com/qarmin/qml_formatter.git
rev: 0.2.0
hooks:
- id: qml_formatter
- repo: local
hooks:
- id: qsscheck
Expand All @@ -139,13 +145,6 @@ repos:
language: python
types: [text]
files: ^CHANGELOG.md$
- id: qmlformat
name: qmlformat
entry: python tools/qmlformat.py
pass_filenames: true
language: python
types: [text]
files: ^.*\.qml$
- id: qmllint
name: qmllint
entry: qmllint
Expand Down
6 changes: 0 additions & 6 deletions res/qml/AuxiliaryUnit.qml
Expand Up @@ -38,7 +38,6 @@ Row {
key: "pregain"
color: Theme.gainKnobColor
}

}

Column {
Expand All @@ -57,7 +56,6 @@ Row {
activeColor: Theme.pflActiveButtonColor
toggleable: true
}

}

Skin.EmbeddedBackground {
Expand Down Expand Up @@ -93,7 +91,6 @@ Row {
anchors.centerIn: parent
text: "FX1"
}

}

Skin.InfoBarButton {
Expand All @@ -109,9 +106,6 @@ Row {
anchors.centerIn: parent
text: "FX2"
}

}

}

}
4 changes: 0 additions & 4 deletions res/qml/Button.qml
Expand Up @@ -72,7 +72,6 @@ AbstractButton {
target: labelGlow
visible: false
}

}
]

Expand All @@ -90,7 +89,6 @@ AbstractButton {
right: 10
bottom: 10
}

}

contentItem: Item {
Expand Down Expand Up @@ -119,7 +117,5 @@ AbstractButton {
font.pixelSize: Theme.buttonFontPixelSize
color: root.normalColor
}

}

}
4 changes: 0 additions & 4 deletions res/qml/ComboBox.qml
Expand Up @@ -31,7 +31,6 @@ ComboBox {
border.color: Theme.deckLineColor
color: "transparent"
}

}

contentItem: Text {
Expand All @@ -57,12 +56,9 @@ ComboBox {

ScrollIndicator.vertical: ScrollIndicator {
}

}

background: Skin.EmbeddedBackground {
}

}

}
2 changes: 0 additions & 2 deletions res/qml/ControlButton.qml
Expand Up @@ -22,7 +22,6 @@ Skin.Button {
onReleased: {
if (!toggleable)
control.value = 0;

}

Mixxx.ControlProxy {
Expand All @@ -31,5 +30,4 @@ Skin.Button {
group: root.group
key: root.key
}

}
1 change: 0 additions & 1 deletion res/qml/ControlKnob.qml
Expand Up @@ -18,5 +18,4 @@ Skin.Knob {
TapHandler {
onDoubleTapped: control.reset()
}

}
1 change: 0 additions & 1 deletion res/qml/ControlMiniKnob.qml
Expand Up @@ -18,5 +18,4 @@ Skin.MiniKnob {
TapHandler {
onDoubleTapped: control.reset()
}

}
1 change: 0 additions & 1 deletion res/qml/ControlSlider.qml
Expand Up @@ -16,5 +16,4 @@ Skin.Slider {
TapHandler {
onDoubleTapped: control.reset()
}

}
4 changes: 0 additions & 4 deletions res/qml/CrossfaderRow.qml
Expand Up @@ -42,7 +42,6 @@ Item {

Skin.MicrophoneDuckingPanel {
}

}

Skin.SectionBackground {
Expand All @@ -68,7 +67,6 @@ Item {
fg: Theme.imgCrossfaderHandle
bg: Theme.imgCrossfaderBackground
}

}

Row {
Expand Down Expand Up @@ -100,7 +98,5 @@ Item {
layoutDirection: Qt.RightToLeft
unitNumber: 4
}

}

}
12 changes: 0 additions & 12 deletions res/qml/Deck.qml
Expand Up @@ -68,7 +68,6 @@ Item {
FadeBehavior on visible {
fadeTarget: rateSlider
}

}

Rectangle {
Expand Down Expand Up @@ -128,7 +127,6 @@ Item {
anchors.centerIn: parent
text: "FX 1"
}

}

Rectangle {
Expand All @@ -155,7 +153,6 @@ Item {
anchors.centerIn: parent
text: "FX 2"
}

}

Rectangle {
Expand Down Expand Up @@ -214,7 +211,6 @@ Item {
group: root.group
key: "track_samples"
}

}

Item {
Expand Down Expand Up @@ -250,7 +246,6 @@ Item {
anchors.centerIn: parent
source: "images/icon_quantize.svg"
}

}

Item {
Expand Down Expand Up @@ -286,15 +281,12 @@ Item {
anchors.centerIn: parent
source: "images/icon_passthrough.svg"
}

}

}

FadeBehavior on visible {
fadeTarget: overview
}

}

Item {
Expand Down Expand Up @@ -351,9 +343,7 @@ Item {
width: playButton.height
height: playButton.height
}

}

}

Skin.SyncButton {
Expand All @@ -367,12 +357,10 @@ Item {
FadeBehavior on visible {
fadeTarget: buttonBar
}

}

Mixxx.PlayerDropArea {
anchors.fill: parent
group: root.group
}

}
7 changes: 0 additions & 7 deletions res/qml/DeckInfoBar.qml
Expand Up @@ -88,11 +88,8 @@ Rectangle {
height: parent.height / 2
color: Theme.deckTextColor
}

}

}

}

Skin.EmbeddedText {
Expand Down Expand Up @@ -181,7 +178,6 @@ Rectangle {
group: root.group
key: "bpm"
}

}

Skin.EmbeddedText {
Expand All @@ -202,7 +198,6 @@ Rectangle {
group: root.group
key: "rate_ratio"
}

}

gradient: Gradient {
Expand All @@ -223,7 +218,5 @@ Rectangle {
position: 1
color: Theme.deckBackgroundColor
}

}

}
5 changes: 0 additions & 5 deletions res/qml/DeckRow.qml
Expand Up @@ -63,7 +63,6 @@ Item {
target: rightDeck
anchors.left: mixer.right
}

}
]

Expand All @@ -88,7 +87,6 @@ Item {
FadeBehavior on visible {
fadeTarget: mixer
}

}

Deck {
Expand Down Expand Up @@ -116,9 +114,6 @@ Item {
property: "implicitHeight"
duration: 150
}

}

}

}
17 changes: 0 additions & 17 deletions res/qml/DeveloperToolsWindow.qml
Expand Up @@ -55,7 +55,6 @@ Window {
right: 20
bottom: 10
}

}

Text {
Expand Down Expand Up @@ -94,9 +93,7 @@ Window {
TapHandler {
onTapped: controlModel.toggleSortColumn(headerDlgt.column)
}

}

}

TableView {
Expand Down Expand Up @@ -150,9 +147,7 @@ Window {
elide: Text.ElideRight
color: Theme.deckTextColor
}

}

}

DelegateChoice {
Expand All @@ -177,9 +172,7 @@ Window {
elide: Text.ElideRight
color: Theme.deckTextColor
}

}

}

DelegateChoice {
Expand Down Expand Up @@ -216,11 +209,8 @@ Window {

validator: DoubleValidator {
}

}

}

}

DelegateChoice {
Expand Down Expand Up @@ -257,17 +247,10 @@ Window {

validator: DoubleValidator {
}

}

}

}

}

}

}

}

0 comments on commit fa06c46

Please sign in to comment.