diff --git a/res/qml/AuxiliaryUnit.qml b/res/qml/AuxiliaryUnit.qml index 173378e26bcf..a593549046d2 100644 --- a/res/qml/AuxiliaryUnit.qml +++ b/res/qml/AuxiliaryUnit.qml @@ -5,7 +5,7 @@ import "Theme" Row { id: root - property int unitNumber // required + required property int unitNumber property string group: "[Auxiliary" + unitNumber + "]" spacing: 5 diff --git a/res/qml/Button.qml b/res/qml/Button.qml index e3a6e1cf6abe..0ef84880cc24 100644 --- a/res/qml/Button.qml +++ b/res/qml/Button.qml @@ -7,7 +7,7 @@ AbstractButton { id: root property color normalColor: Theme.buttonNormalColor - property color activeColor // required + required property color activeColor property color pressedColor: activeColor property bool highlight: false diff --git a/res/qml/ComboBox.qml b/res/qml/ComboBox.qml index 40c7e2343532..26693574e886 100644 --- a/res/qml/ComboBox.qml +++ b/res/qml/ComboBox.qml @@ -12,9 +12,11 @@ ComboBox { delegate: ItemDelegate { id: itemDlgt + required property int index + width: parent.width - highlighted: root.highlightedIndex === index - text: root.textAt(index) + highlighted: root.highlightedIndex === this.index + text: root.textAt(this.index) contentItem: Text { text: itemDlgt.text diff --git a/res/qml/ControlButton.qml b/res/qml/ControlButton.qml index 6a44ef06e2f9..5af2f0d6c0fd 100644 --- a/res/qml/ControlButton.qml +++ b/res/qml/ControlButton.qml @@ -4,8 +4,8 @@ import Mixxx 0.1 as Mixxx Skin.Button { id: root - property string group // required - property string key // required + required property string group + required property string key property bool toggleable: false function toggle() { diff --git a/res/qml/CrossfaderRow.qml b/res/qml/CrossfaderRow.qml index 1a65fc1f30e1..c5498ee4bc36 100644 --- a/res/qml/CrossfaderRow.qml +++ b/res/qml/CrossfaderRow.qml @@ -5,7 +5,7 @@ import "Theme" Item { id: root - property real crossfaderWidth // required + required property real crossfaderWidth implicitHeight: crossfader.height diff --git a/res/qml/Deck.qml b/res/qml/Deck.qml index a37d5550113c..a0dfc465f6ab 100644 --- a/res/qml/Deck.qml +++ b/res/qml/Deck.qml @@ -6,7 +6,7 @@ import "Theme" Item { id: root - property string group // required + required property string group property bool minimized: false property var deckPlayer: Mixxx.PlayerManager.getPlayer(group) @@ -344,15 +344,9 @@ Item { model: 8 Skin.HotcueButton { - // TODO: Once we require Qt >= 5.14, we're going to re-add - // the `required` keyword. If the component has any - // required properties, we'll stumble over a Qt bug and - // need the following workaround: - // required property int index - // See this for details: - // https://bugreports.qt.io/browse/QTBUG-86009, and need - - hotcueNumber: index + 1 + required property int index + + hotcueNumber: this.index + 1 group: root.group width: playButton.height height: playButton.height diff --git a/res/qml/DeckInfoBar.qml b/res/qml/DeckInfoBar.qml index 30c522290f73..c8e6f5c78c42 100644 --- a/res/qml/DeckInfoBar.qml +++ b/res/qml/DeckInfoBar.qml @@ -8,8 +8,8 @@ import "Theme" Rectangle { id: root - property string group // required - property int rightColumnWidth // required + required property string group + required property int rightColumnWidth property var deckPlayer: Mixxx.PlayerManager.getPlayer(group) property color lineColor: Theme.deckLineColor diff --git a/res/qml/DeckRow.qml b/res/qml/DeckRow.qml index b4176c6192f2..459a2b37919a 100644 --- a/res/qml/DeckRow.qml +++ b/res/qml/DeckRow.qml @@ -3,8 +3,8 @@ import QtQuick 2.12 Item { id: root - property string leftDeckGroup // required - property string rightDeckGroup // required + required property string leftDeckGroup + required property string rightDeckGroup property alias mixer: mixer property bool minimized: false diff --git a/res/qml/DeveloperToolsWindow.qml b/res/qml/DeveloperToolsWindow.qml index 08e71f1a6df3..507e4528b4ba 100644 --- a/res/qml/DeveloperToolsWindow.qml +++ b/res/qml/DeveloperToolsWindow.qml @@ -34,9 +34,14 @@ Window { syncView: tableView delegate: Item { + id: headerDlgt + + required property int column + required property string display + implicitHeight: columnName.contentHeight + 5 implicitWidth: columnName.contentWidth + 5 - visible: column < tableView.columnWidths.length + visible: this.column < tableView.columnWidths.length BorderImage { anchors.fill: parent @@ -56,7 +61,7 @@ Window { Text { id: columnName - text: display + text: headerDlgt.display anchors.fill: parent anchors.margins: 5 elide: Text.ElideRight @@ -73,7 +78,7 @@ Window { id: sortIndicator text: controlModel.sortDescending ? "▲" : "▼" - visible: controlModel.sortColumn == column + visible: controlModel.sortColumn == headerDlgt.column anchors.fill: parent anchors.margins: 5 elide: Text.ElideRight @@ -87,7 +92,7 @@ Window { } TapHandler { - onTapped: controlModel.toggleSortColumn(column) + onTapped: controlModel.toggleSortColumn(headerDlgt.column) } } @@ -127,7 +132,12 @@ Window { column: 0 delegate: Rectangle { - implicitWidth: (root.width - 10) * tableView.columnWidths[column] + id: groupDelegate + + required property int column + required property string display + + implicitWidth: (root.width - 10) * tableView.columnWidths[groupDelegate.column] implicitHeight: groupName.contentHeight color: root.color @@ -135,7 +145,7 @@ Window { id: groupName anchors.fill: parent - text: display + text: groupDelegate.display verticalAlignment: Text.AlignVCenter elide: Text.ElideRight color: Theme.deckTextColor @@ -149,7 +159,12 @@ Window { column: 1 delegate: Rectangle { - implicitWidth: (root.width - 10) * tableView.columnWidths[column] + id: keyDelegate + + required property int column + required property string display + + implicitWidth: (root.width - 10) * tableView.columnWidths[keyDelegate.column] implicitHeight: keyName.contentHeight color: root.color @@ -157,7 +172,7 @@ Window { id: keyName anchors.fill: parent - text: display + text: keyDelegate.display verticalAlignment: Text.AlignVCenter elide: Text.ElideRight color: Theme.deckTextColor @@ -171,7 +186,13 @@ Window { column: 2 delegate: Rectangle { - implicitWidth: (root.width - 10) * tableView.columnWidths[column] + id: valueDelegate + + required property int row + required property int column + required property string display + + implicitWidth: (root.width - 10) * tableView.columnWidths[valueDelegate.column] implicitHeight: valueField.implicitHeight color: root.color @@ -179,10 +200,10 @@ Window { id: valueField anchors.fill: parent - text: display + text: valueDelegate.display inputMethodHints: Qt.ImhFormattedNumbersOnly onEditingFinished: { - const idx = controlModel.index(row, column); + const idx = controlModel.index(valueDelegate.row, valueDelegate.column); controlModel.setData(idx, parseFloat(text)); } color: Theme.textColor @@ -206,7 +227,13 @@ Window { column: 3 delegate: Rectangle { - implicitWidth: (root.width - 10) * tableView.columnWidths[column] + id: parameterDelegate + + required property int row + required property int column + required property string display + + implicitWidth: (root.width - 10) * tableView.columnWidths[parameterDelegate.column] implicitHeight: valueField.implicitHeight color: root.color @@ -214,10 +241,10 @@ Window { id: valueField anchors.fill: parent - text: display + text: parameterDelegate.display inputMethodHints: Qt.ImhFormattedNumbersOnly onEditingFinished: { - const idx = controlModel.index(row, column); + const idx = controlModel.index(parameterDelegate.row, parameterDelegate.column); controlModel.setData(idx, parseFloat(text)); } color: Theme.textColor diff --git a/res/qml/EffectSlot.qml b/res/qml/EffectSlot.qml index 4bfcdc3956ef..05ddf41f4b2b 100644 --- a/res/qml/EffectSlot.qml +++ b/res/qml/EffectSlot.qml @@ -7,8 +7,8 @@ Item { id: root property Mixxx.EffectSlotProxy slot: Mixxx.EffectsManager.getEffectSlot(unitNumber, effectNumber) - property int unitNumber // required - property int effectNumber // required + required property int unitNumber + required property int effectNumber property bool expanded: false readonly property string group: slot.group property real maxSelectorWidth: 300 @@ -107,10 +107,14 @@ Item { delegate: Item { id: parameter + required property int index + required property string shortName + required property string name + required property string controlKey + required property int type property int number: index + 1 // TODO: Use null coalescing when we switch to Qt >= 5.15 - property string label: shortName ? shortName : name - property string key: controlKey + property string label: shortName ?? name property bool isKnob: type == 0 property bool isButton: type == 1 @@ -132,7 +136,7 @@ Item { anchors.centerIn: parent arcStart: 0 group: root.group - key: parameter.key + key: parameter.controlKey color: Theme.effectColor visible: parameter.isKnob @@ -142,7 +146,7 @@ Item { property bool loaded: value != 0 group: root.group - key: parameter.key + "_loaded" + key: parameter.controlKey + "_loaded" } } @@ -154,7 +158,7 @@ Item { width: parent.width anchors.centerIn: parent group: root.group - key: parameter.key + key: parameter.controlKey activeColor: Theme.effectColor visible: parameter.isButton toggleable: true @@ -166,7 +170,7 @@ Item { property bool loaded: value != 0 group: root.group - key: parameter.key + "_loaded" + key: parameter.controlKey + "_loaded" } } diff --git a/res/qml/EffectUnit.qml b/res/qml/EffectUnit.qml index 2c36b497bd39..fd0f07b1f388 100644 --- a/res/qml/EffectUnit.qml +++ b/res/qml/EffectUnit.qml @@ -5,7 +5,7 @@ import "Theme" Item { id: root - property int unitNumber // required + required property int unitNumber implicitHeight: effectContainer.height diff --git a/res/qml/EqColumn.qml b/res/qml/EqColumn.qml index 52f741cccc64..ee58208c42b5 100644 --- a/res/qml/EqColumn.qml +++ b/res/qml/EqColumn.qml @@ -6,7 +6,7 @@ import "Theme" Column { id: root - property string group // required + required property string group spacing: 4 diff --git a/res/qml/EqKnob.qml b/res/qml/EqKnob.qml index 615b60a9157c..29155a885363 100644 --- a/res/qml/EqKnob.qml +++ b/res/qml/EqKnob.qml @@ -7,8 +7,8 @@ Rectangle { id: root property alias knob: knob - property string statusGroup: root.knob.group // required - property string statusKey // required + property string statusGroup: root.knob.group + required property string statusKey color: Theme.knobBackgroundColor width: 56 diff --git a/res/qml/Hotcue.qml b/res/qml/Hotcue.qml index cd55fe375073..50c2ed33f77c 100644 --- a/res/qml/Hotcue.qml +++ b/res/qml/Hotcue.qml @@ -5,8 +5,8 @@ import "Theme" Item { id: root - property int hotcueNumber // required - property string group // required + required property int hotcueNumber + required property string group property alias activate: hotcueActivateControl.value property alias clear: hotcueClearControl.value readonly property bool isSet: hotcueStatusControl.value != 0 diff --git a/res/qml/HotcueButton.qml b/res/qml/HotcueButton.qml index 48b82252af2a..f77eff425202 100644 --- a/res/qml/HotcueButton.qml +++ b/res/qml/HotcueButton.qml @@ -4,8 +4,8 @@ import QtQuick 2.12 Skin.Button { id: root - property int hotcueNumber // required - property string group // required + required property int hotcueNumber + required property string group text: hotcueNumber activeColor: hotcue.color diff --git a/res/qml/HotcuePopup.qml b/res/qml/HotcuePopup.qml index 3bf7746fc069..50c8fb1f0804 100644 --- a/res/qml/HotcuePopup.qml +++ b/res/qml/HotcuePopup.qml @@ -7,7 +7,7 @@ import "Theme" Popup { id: root - property Hotcue hotcue // required + required property Hotcue hotcue dim: false modal: true @@ -26,6 +26,8 @@ Popup { model: Mixxx.Config.getHotcueColorPalette() Rectangle { + required property color modelData + height: 24 width: 24 color: modelData diff --git a/res/qml/InfoBarButton.qml b/res/qml/InfoBarButton.qml index fe118c9adf67..349f46f97af6 100644 --- a/res/qml/InfoBarButton.qml +++ b/res/qml/InfoBarButton.qml @@ -7,11 +7,11 @@ import "Theme" AbstractButton { id: root - property string group // required - property string key // required + required property string group + required property string key property alias foreground: foreground.data property color normalColor: Theme.buttonNormalColor - property color activeColor // required + required property color activeColor property color pressedColor: activeColor property alias highlight: control.value diff --git a/res/qml/Knob.qml b/res/qml/Knob.qml index 8405716bb083..74f1013b2072 100644 --- a/res/qml/Knob.qml +++ b/res/qml/Knob.qml @@ -5,7 +5,7 @@ import "Theme" MixxxControls.Knob { id: root - property color color // required + required property color color property url shadowSource: Theme.imgKnobShadow property url backgroundSource: Theme.imgKnob diff --git a/res/qml/Library.qml b/res/qml/Library.qml index b5214750f868..657cb582035f 100644 --- a/res/qml/Library.qml +++ b/res/qml/Library.qml @@ -79,15 +79,20 @@ Item { } delegate: Item { - id: itemDelegate + id: itemDlgt + + required property int index + required property url fileUrl + required property string artist + required property string title implicitWidth: listView.width implicitHeight: 30 Text { anchors.verticalCenter: parent.verticalCenter - text: artist + " - " + title - color: (listView.currentIndex == index && listView.activeFocus) ? Theme.blue : Theme.deckTextColor + text: itemDlgt.artist + " - " + itemDlgt.title + color: (listView.currentIndex == itemDlgt.index && listView.activeFocus) ? Theme.blue : Theme.deckTextColor Behavior on color { ColorAnimation { @@ -105,8 +110,8 @@ Item { Drag.dragType: Drag.Automatic Drag.supportedActions: Qt.CopyAction Drag.mimeData: { - "text/uri-list": fileUrl, - "text/plain": fileUrl + "text/uri-list": itemDlgt.fileUrl, + "text/plain": itemDlgt.fileUrl } anchors.fill: parent } @@ -118,7 +123,7 @@ Item { drag.target: dragItem onPressed: { listView.forceActiveFocus(); - listView.currentIndex = index; + listView.currentIndex = itemDlgt.index; parent.grabToImage((result) => { dragItem.Drag.imageSource = result.url; }); diff --git a/res/qml/LibraryControl.qml b/res/qml/LibraryControl.qml index 0cbe090fd268..e81b20673b32 100644 --- a/res/qml/LibraryControl.qml +++ b/res/qml/LibraryControl.qml @@ -110,6 +110,8 @@ Item { model: numDecksControl.value delegate: LibraryControlLoadSelectedTrackHandler { + required property int index + group: "[Channel" + (index + 1) + "]" enabled: root.focusWidget == FocusedWidgetControl.WidgetKind.LibraryView onLoadTrackRequested: (play) => { @@ -130,6 +132,8 @@ Item { model: numPreviewDecksControl.value delegate: LibraryControlLoadSelectedTrackHandler { + required property int index + group: "[PreviewDeck" + (index + 1) + "]" enabled: root.focusWidget == FocusedWidgetControl.WidgetKind.LibraryView onLoadTrackRequested: (play) => { @@ -150,6 +154,8 @@ Item { model: numSamplersControl.value delegate: LibraryControlLoadSelectedTrackHandler { + required property int index + group: "[Sampler" + (index + 1) + "]" enabled: root.focusWidget == FocusedWidgetControl.WidgetKind.LibraryView onLoadTrackRequested: (play) => { diff --git a/res/qml/LibraryControlLoadSelectedTrackHandler.qml b/res/qml/LibraryControlLoadSelectedTrackHandler.qml index 7d1bcda7529b..9a32aba67d13 100644 --- a/res/qml/LibraryControlLoadSelectedTrackHandler.qml +++ b/res/qml/LibraryControlLoadSelectedTrackHandler.qml @@ -8,7 +8,7 @@ import QtQuick 2.12 Item { id: root - property string group // required + required property string group property bool enabled: true signal loadTrackRequested(bool play) diff --git a/res/qml/MicrophoneUnit.qml b/res/qml/MicrophoneUnit.qml index bcfcf558bf4e..2ec8b194f450 100644 --- a/res/qml/MicrophoneUnit.qml +++ b/res/qml/MicrophoneUnit.qml @@ -5,7 +5,7 @@ import "Theme" Row { id: root - property int unitNumber // required + required property int unitNumber property string group: unitNumber === 1 ? "[Microphone]" : "[Microphone" + unitNumber + "]" spacing: 5 diff --git a/res/qml/Mixer.qml b/res/qml/Mixer.qml index 53dc71f3179d..534e595c8aba 100644 --- a/res/qml/Mixer.qml +++ b/res/qml/Mixer.qml @@ -4,8 +4,8 @@ import QtQuick 2.12 Item { id: root - property string leftDeckGroup // required - property string rightDeckGroup // required + required property string leftDeckGroup + required property string rightDeckGroup property bool show4decks: false implicitWidth: content.width + 10 diff --git a/res/qml/MixerColumn.qml b/res/qml/MixerColumn.qml index f36202b7e5dc..4a096b34e5a2 100644 --- a/res/qml/MixerColumn.qml +++ b/res/qml/MixerColumn.qml @@ -5,7 +5,7 @@ import "Theme" Item { id: root - property string group // required + required property string group Rectangle { id: gainKnobFrame diff --git a/res/qml/Mixxx/Controls/Spinny.qml b/res/qml/Mixxx/Controls/Spinny.qml index 07c8012cb7b8..9fdc83ad292d 100644 --- a/res/qml/Mixxx/Controls/Spinny.qml +++ b/res/qml/Mixxx/Controls/Spinny.qml @@ -5,7 +5,7 @@ import QtQuick.Controls 2.12 Item { id: root - property string group // required + required property string group property real rpm: 33 property bool indicatorVisible: true property alias indicator: indicatorContainer.contentItem diff --git a/res/qml/Mixxx/Controls/WaveformOverview.qml b/res/qml/Mixxx/Controls/WaveformOverview.qml index 92e6e33e1172..51ba266b0969 100644 --- a/res/qml/Mixxx/Controls/WaveformOverview.qml +++ b/res/qml/Mixxx/Controls/WaveformOverview.qml @@ -5,7 +5,7 @@ import QtQuick 2.12 Mixxx.WaveformOverview { id: root - property string group // required + required property string group player: Mixxx.PlayerManager.getPlayer(root.group) @@ -36,9 +36,11 @@ Mixxx.WaveformOverview { model: 8 MixxxControls.WaveformOverviewHotcueMarker { + required property int index + anchors.fill: parent group: root.group - hotcueNumber: index + 1 + hotcueNumber: this.index + 1 } } diff --git a/res/qml/Mixxx/Controls/WaveformOverviewHotcueMarker.qml b/res/qml/Mixxx/Controls/WaveformOverviewHotcueMarker.qml index 4a3b348bc036..53a5afb94c15 100644 --- a/res/qml/Mixxx/Controls/WaveformOverviewHotcueMarker.qml +++ b/res/qml/Mixxx/Controls/WaveformOverviewHotcueMarker.qml @@ -5,8 +5,8 @@ import QtQuick.Shapes 1.12 Item { id: root - property string group // required - property int hotcueNumber // required + required property string group + required property int hotcueNumber function updatePosition() { const totalSamples = trackSamplesControl.value; diff --git a/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml b/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml index ecb75ffe6454..713d3b7066cb 100644 --- a/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml +++ b/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml @@ -6,8 +6,8 @@ import QtQuick.Window 2.12 Item { id: root - property string group // required - property string key // required + required property string group + required property string key property string color: "white" Shape { diff --git a/res/qml/Mixxx/PlayerDropArea.qml b/res/qml/Mixxx/PlayerDropArea.qml index a461a5ee5f49..bea61285def1 100644 --- a/res/qml/Mixxx/PlayerDropArea.qml +++ b/res/qml/Mixxx/PlayerDropArea.qml @@ -3,7 +3,7 @@ import QtQuick 2.12 // Handles drops on decks and samplers DropArea { - property string group // required + required property string group property var player: Mixxx.PlayerManager.getPlayer(group) onDropped: (drop) => { diff --git a/res/qml/OrientationToggleButton.qml b/res/qml/OrientationToggleButton.qml index a2279e3d2a55..79ca30deeb6b 100644 --- a/res/qml/OrientationToggleButton.qml +++ b/res/qml/OrientationToggleButton.qml @@ -5,8 +5,8 @@ import QtQuick 2.12 Item { id: root - property string group // required - property string key // required + required property string group + required property string key property alias orientation: orientationSlider.value property color color: "white" diff --git a/res/qml/Sampler.qml b/res/qml/Sampler.qml index 22e4031ce2de..18e2662eeb51 100644 --- a/res/qml/Sampler.qml +++ b/res/qml/Sampler.qml @@ -6,7 +6,7 @@ import "Theme" Rectangle { id: root - property string group // required + required property string group property bool minimized: false property var deckPlayer: Mixxx.PlayerManager.getPlayer(group) diff --git a/res/qml/SamplerRow.qml b/res/qml/SamplerRow.qml index 5b818c921d35..a8ae495ed636 100644 --- a/res/qml/SamplerRow.qml +++ b/res/qml/SamplerRow.qml @@ -9,6 +9,8 @@ RowLayout { model: 8 Skin.Sampler { + required property int index + Layout.fillWidth: true group: "[Sampler" + (index + 1) + "]" } diff --git a/res/qml/SyncButton.qml b/res/qml/SyncButton.qml index b3aec256dd06..9f696e8a28fc 100644 --- a/res/qml/SyncButton.qml +++ b/res/qml/SyncButton.qml @@ -12,7 +12,7 @@ Skin.Button { ExplicitLeader } - property string group // required + required property string group property alias mode: modeControl.value function toggleSync() { diff --git a/res/qml/VuMeter.qml b/res/qml/VuMeter.qml index d9ed564b62d5..84b944ad94d7 100644 --- a/res/qml/VuMeter.qml +++ b/res/qml/VuMeter.qml @@ -6,9 +6,8 @@ import "Theme" Rectangle { id: root - property string group // required - property string key // required - property color barColor // required + required property string group + required property string key radius: width / 2 color: "black" diff --git a/res/qml/WaveformOverview.qml b/res/qml/WaveformOverview.qml index cce482569e36..454e3a833991 100644 --- a/res/qml/WaveformOverview.qml +++ b/res/qml/WaveformOverview.qml @@ -7,7 +7,7 @@ import "Theme" Item { id: root - property string group // required + required property string group states: [ State { diff --git a/src/qml/qmlcontrolproxy.h b/src/qml/qmlcontrolproxy.h index 1864ee3d8146..326d85c11851 100644 --- a/src/qml/qmlcontrolproxy.h +++ b/src/qml/qmlcontrolproxy.h @@ -16,8 +16,8 @@ class QmlControlProxy : public QObject, public QQmlParserStatus { // TODO: The REQUIRED flag only exists in Qt 5.14 and later. Once we // require that as minimum dependency, add it to the group and key // properties. - Q_PROPERTY(QString group READ getGroup WRITE setGroup NOTIFY groupChanged) - Q_PROPERTY(QString key READ getKey WRITE setKey NOTIFY keyChanged) + Q_PROPERTY(QString group READ getGroup WRITE setGroup NOTIFY groupChanged REQUIRED) + Q_PROPERTY(QString key READ getKey WRITE setKey NOTIFY keyChanged REQUIRED) Q_PROPERTY(bool keyValid READ isKeyValid NOTIFY keyValidChanged) Q_PROPERTY(bool initialized READ isInitialized NOTIFY initializedChanged) Q_PROPERTY(double value READ getValue WRITE setValue NOTIFY valueChanged) diff --git a/src/qml/qmlwaveformoverview.h b/src/qml/qmlwaveformoverview.h index 7c788f9cebf9..7d10494a2855 100644 --- a/src/qml/qmlwaveformoverview.h +++ b/src/qml/qmlwaveformoverview.h @@ -16,8 +16,8 @@ class QmlPlayerProxy; class QmlWaveformOverview : public QQuickPaintedItem { Q_OBJECT Q_FLAGS(Channels) - Q_PROPERTY(mixxx::qml::QmlPlayerProxy* player READ getPlayer - WRITE setPlayer NOTIFY playerChanged) + Q_PROPERTY(mixxx::qml::QmlPlayerProxy* player READ getPlayer WRITE setPlayer + NOTIFY playerChanged REQUIRED) Q_PROPERTY(Channels channels READ getChannels WRITE setChannels NOTIFY channelsChanged) Q_PROPERTY(Renderer renderer MEMBER m_renderer NOTIFY rendererChanged) Q_PROPERTY(QColor colorHigh MEMBER m_colorHigh NOTIFY colorHighChanged) diff --git a/tools/qmlformat.py b/tools/qmlformat.py index 413a0be7e408..15e250c73c6f 100755 --- a/tools/qmlformat.py +++ b/tools/qmlformat.py @@ -45,21 +45,6 @@ def main(argv=None): for filename in args.file: subprocess.call((qmlformat_executable, "-i", filename)) - # Replace required properties - # (incompatible with Qt 5.12) - with open(filename, mode="r") as fp: - text = fp.read() - - text = re.sub( - r"^(\s*)required property (.*)$", - r"\g<1>property \g<2> // required", - text, - flags=re.MULTILINE, - ) - - with open(filename, mode="w") as fp: - fp.write(text) - return 0