[vlc-commits] qml: reindent after latest patches
Pierre Lamot
git at videolan.org
Fri Sep 6 18:02:11 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Sep 6 16:59:23 2019 +0200| [241235183aa3c800adffcdef308804566a0c02c7] | committer: Jean-Baptiste Kempf
qml: reindent after latest patches
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=241235183aa3c800adffcdef308804566a0c02c7
---
modules/gui/qt/qml/BannerSources.qml | 76 ++++-----
modules/gui/qt/qml/MainInterface.qml | 6 +-
modules/gui/qt/qml/mediacenter/MCMainDisplay.qml | 8 +-
modules/gui/qt/qml/mediacenter/MCMusicDisplay.qml | 6 +-
.../gui/qt/qml/mediacenter/MCNetworkDisplay.qml | 74 ++++-----
modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml | 174 ++++++++++-----------
.../gui/qt/qml/mediacenter/MusicArtistsDisplay.qml | 4 +-
modules/gui/qt/qml/mediacenter/NetworkListItem.qml | 4 +-
.../gui/qt/qml/mediacenter/VideoExpandableGrid.qml | 10 +-
modules/gui/qt/qml/player/ControlBar.qml | 4 +-
modules/gui/qt/qml/player/Player.qml | 2 +-
modules/gui/qt/qml/utils/ExpandGridView.qml | 4 +-
modules/gui/qt/qml/utils/KeyNavigableTableView.qml | 22 +--
13 files changed, 197 insertions(+), 197 deletions(-)
diff --git a/modules/gui/qt/qml/BannerSources.qml b/modules/gui/qt/qml/BannerSources.qml
index d8b7ba4df8..a96c48cfe6 100644
--- a/modules/gui/qt/qml/BannerSources.qml
+++ b/modules/gui/qt/qml/BannerSources.qml
@@ -381,51 +381,51 @@ Utils.NavigableFocusScope {
onClicked: mainMenu.openBelow(this)
- Menus.MainDropdownMenu {
- id: mainMenu
- onClosed: {
- if (mainMenu.activeFocus)
- menu_selector.forceActiveFocus()
+ Menus.MainDropdownMenu {
+ id: mainMenu
+ onClosed: {
+ if (mainMenu.activeFocus)
+ menu_selector.forceActiveFocus()
+ }
}
}
}
- }
- // Content model states
- states: [
- State {
- name: "contentModel"
- when: root.contentModel !== undefined
- PropertyChanges {
- target: searchBox
- visible: true
- }
- PropertyChanges {
- target: sortControl
- visible: true
- }
- },
- State {
- name: "noContentModel"
- when: root.contentModel === undefined
- PropertyChanges {
- target: searchBox
- visible: false
- }
- PropertyChanges {
- target: sortControl
- visible: false
+ // Content model states
+ states: [
+ State {
+ name: "contentModel"
+ when: root.contentModel !== undefined
+ PropertyChanges {
+ target: searchBox
+ visible: true
+ }
+ PropertyChanges {
+ target: sortControl
+ visible: true
+ }
+ },
+ State {
+ name: "noContentModel"
+ when: root.contentModel === undefined
+ PropertyChanges {
+ target: searchBox
+ visible: false
+ }
+ PropertyChanges {
+ target: sortControl
+ visible: false
+ }
}
- }
- ]
+ ]
+ }
}
}
- }
- Keys.priority: Keys.AfterItem
- Keys.onPressed: {
- if (!event.accepted)
- defaultKeyAction(event, 0)
+ Keys.priority: Keys.AfterItem
+ Keys.onPressed: {
+ if (!event.accepted)
+ defaultKeyAction(event, 0)
+ }
}
}
-}
diff --git a/modules/gui/qt/qml/MainInterface.qml b/modules/gui/qt/qml/MainInterface.qml
index 685aebbe0d..6a7da28825 100644
--- a/modules/gui/qt/qml/MainInterface.qml
+++ b/modules/gui/qt/qml/MainInterface.qml
@@ -127,7 +127,7 @@ Rectangle {
target: player
onPlayingStateChanged: {
if (player.playingState === PlayerController.PLAYING_STATE_STOPPED
- && history.current.view === "player") {
+ && history.current.view === "player") {
history.previous(History.Go)
}
}
@@ -137,8 +137,8 @@ Rectangle {
target: player.videoTracks
onDataChanged: {
if (player.videoTracks.rowCount() > 0
- && player.playingState === PlayerController.PLAYING_STATE_PLAYING
- && history.current.view !== "player") {
+ && player.playingState === PlayerController.PLAYING_STATE_PLAYING
+ && history.current.view !== "player") {
history.push(["player"], History.Go)
}
}
diff --git a/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml b/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml
index 3b7a119c78..d78b53f9fc 100644
--- a/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml
@@ -73,10 +73,10 @@ Utils.NavigableFocusScope {
Component.onCompleted: {
pageModel.forEach(function(e) {
append({
- displayText: e.displayText,
- icon: e.icon,
- name: e.name,
- })
+ displayText: e.displayText,
+ icon: e.icon,
+ name: e.name,
+ })
})
}
}
diff --git a/modules/gui/qt/qml/mediacenter/MCMusicDisplay.qml b/modules/gui/qt/qml/mediacenter/MCMusicDisplay.qml
index 6a7eb0004b..67c37c5b6e 100644
--- a/modules/gui/qt/qml/mediacenter/MCMusicDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCMusicDisplay.qml
@@ -73,9 +73,9 @@ Utils.NavigableFocusScope {
Component.onCompleted: {
pageModel.forEach(function(e) {
append({
- displayText: e.displayText,
- name: e.name,
- })
+ displayText: e.displayText,
+ name: e.name,
+ })
})
}
}
diff --git a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
index a27d5b56a5..6333489603 100644
--- a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
@@ -42,9 +42,9 @@ Utils.NavigableFocusScope {
id: instanciator
function perform(id){
switch(id){
- case 0: console.log("not implemented"); break;
- case 1: contextMenu.model.indexed = !contextMenu.model.indexed; break;
- default: console.log("unknown id:",id)
+ case 0: console.log("not implemented"); break;
+ case 1: contextMenu.model.indexed = !contextMenu.model.indexed; break;
+ default: console.log("unknown id:",id)
}
contextMenu.close()
}
@@ -233,50 +233,50 @@ Utils.NavigableFocusScope {
}
}
- Component{
- id: gridComponent
+ Component{
+ id: gridComponent
- Utils.KeyNavigableGridView {
- id: gridView_id
- height: view.height
- width: view.width
+ Utils.KeyNavigableGridView {
+ id: gridView_id
+ height: view.height
+ width: view.width
- model: delegateModel.parts.grid
- modelCount: delegateModel.items.count
- currentIndex: view.currentIndexProvider
+ model: delegateModel.parts.grid
+ modelCount: delegateModel.items.count
+ currentIndex: view.currentIndexProvider
- focus: true
+ focus: true
- cellWidth: VLCStyle.network_normal + VLCStyle.margin_large
- cellHeight: VLCStyle.network_normal + VLCStyle.margin_xlarge
+ cellWidth: VLCStyle.network_normal + VLCStyle.margin_large
+ cellHeight: VLCStyle.network_normal + VLCStyle.margin_xlarge
- onSelectAll: delegateModel.selectAll()
- onSelectionUpdated: delegateModel.updateSelection( keyModifiers, oldIndex, newIndex )
- onActionAtIndex: delegateModel.actionAtIndex(index)
+ onSelectAll: delegateModel.selectAll()
+ onSelectionUpdated: delegateModel.updateSelection( keyModifiers, oldIndex, newIndex )
+ onActionAtIndex: delegateModel.actionAtIndex(index)
- navigationParent: root
- }
- }
+ navigationParent: root
+ }
+ }
- Component{
- id: listComponent
- Utils.KeyNavigableListView {
- height: view.height
- width: view.width
- model: delegateModel.parts.list
- modelCount: delegateModel.items.count
- currentIndex: view.currentIndexProvider
+ Component{
+ id: listComponent
+ Utils.KeyNavigableListView {
+ height: view.height
+ width: view.width
+ model: delegateModel.parts.list
+ modelCount: delegateModel.items.count
+ currentIndex: view.currentIndexProvider
- focus: true
- spacing: VLCStyle.margin_xxxsmall
+ focus: true
+ spacing: VLCStyle.margin_xxxsmall
- onSelectAll: delegateModel.selectAll()
- onSelectionUpdated: delegateModel.updateSelection( keyModifiers, oldIndex, newIndex )
- onActionAtIndex: delegateModel.actionAtIndex(index)
+ onSelectAll: delegateModel.selectAll()
+ onSelectionUpdated: delegateModel.updateSelection( keyModifiers, oldIndex, newIndex )
+ onActionAtIndex: delegateModel.actionAtIndex(index)
- navigationParent: root
- }
- }
+ navigationParent: root
+ }
+ }
Utils.StackViewExt {
id: view
diff --git a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
index d65a04c21f..2e7b208fbb 100644
--- a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
@@ -41,50 +41,50 @@ Utils.NavigableFocusScope {
}
Utils.MenuExt {
- id: contextMenu
- property var model: ({})
- closePolicy: Popup.CloseOnReleaseOutside | Popup.CloseOnEscape
-
- Utils.MenuItemExt {
- id: playMenuItem
- text: "Play from start"
- onTriggered: medialib.addAndPlay( contextMenu.model.id )
- }
- Utils.MenuItemExt {
- text: "Play all"
- onTriggered: console.log("not implemented")
- }
- Utils.MenuItemExt {
- text: "Play as audio"
- onTriggered: console.log("not implemented")
- }
- Utils.MenuItemExt {
- text: "Enqueue"
- onTriggered: medialib.addToPlaylist( contextMenu.model.id )
- }
- Utils.MenuItemExt {
- enabled: medialib.gridView
- text: "Information"
- onTriggered: {
- view.currentItem.switchExpandItem(contextMenu.model.index, view.currentItem.currentItem)
- }
- }
- Utils.MenuItemExt {
- text: "Download subtitles"
- onTriggered: console.log("not implemented")
- }
- Utils.MenuItemExt {
- text: "Add to playlist"
- onTriggered: console.log("not implemented")
- }
- Utils.MenuItemExt {
- text: "Delete"
- onTriggered: deleteDialog.open()
- }
-
- onClosed: contextMenu.parent.forceActiveFocus()
-
- }
+ id: contextMenu
+ property var model: ({})
+ closePolicy: Popup.CloseOnReleaseOutside | Popup.CloseOnEscape
+
+ Utils.MenuItemExt {
+ id: playMenuItem
+ text: "Play from start"
+ onTriggered: medialib.addAndPlay( contextMenu.model.id )
+ }
+ Utils.MenuItemExt {
+ text: "Play all"
+ onTriggered: console.log("not implemented")
+ }
+ Utils.MenuItemExt {
+ text: "Play as audio"
+ onTriggered: console.log("not implemented")
+ }
+ Utils.MenuItemExt {
+ text: "Enqueue"
+ onTriggered: medialib.addToPlaylist( contextMenu.model.id )
+ }
+ Utils.MenuItemExt {
+ enabled: medialib.gridView
+ text: "Information"
+ onTriggered: {
+ view.currentItem.switchExpandItem(contextMenu.model.index, view.currentItem.currentItem)
+ }
+ }
+ Utils.MenuItemExt {
+ text: "Download subtitles"
+ onTriggered: console.log("not implemented")
+ }
+ Utils.MenuItemExt {
+ text: "Add to playlist"
+ onTriggered: console.log("not implemented")
+ }
+ Utils.MenuItemExt {
+ text: "Delete"
+ onTriggered: deleteDialog.open()
+ }
+
+ onClosed: contextMenu.parent.forceActiveFocus()
+
+ }
Utils.SelectableDelegateModel {
id: videosDelegate
@@ -106,42 +106,42 @@ Utils.NavigableFocusScope {
Component {
id: gridComponent
- VideoExpandableGrid {
- id: videosGV
- property Item currentItem: Item{}
+ VideoExpandableGrid {
+ id: videosGV
+ property Item currentItem: Item{}
- activeFocusOnTab:true
- model: videosDelegate
- modelCount: videosDelegate.items.count
+ activeFocusOnTab:true
+ model: videosDelegate
+ modelCount: videosDelegate.items.count
- headerDelegate: Utils.LabelSeparator {
- id: videosSeparator
- width: videosGV.width
- text: qsTr("Videos")
- }
+ headerDelegate: Utils.LabelSeparator {
+ id: videosSeparator
+ width: videosGV.width
+ text: qsTr("Videos")
+ }
- expandDelegateImplicitHeight: view.height/3
- expandDelegateWidth: view.width
+ expandDelegateImplicitHeight: view.height/3
+ expandDelegateWidth: view.width
- delegate: VideoGridItem {
- id: videoGridItem
+ delegate: VideoGridItem {
+ id: videoGridItem
- onItemClicked : {
- if (key == Qt.RightButton){
- contextMenu.model = videoGridItem.model
- contextMenu.popup(menuParent)
- }
- videosDelegate.updateSelection( modifier , videosGV.currentIndex, index)
- videosGV.currentIndex = index
- videosGV.forceActiveFocus()
- videosGV.renderLayout()
- }
- }
+ onItemClicked : {
+ if (key == Qt.RightButton){
+ contextMenu.model = videoGridItem.model
+ contextMenu.popup(menuParent)
+ }
+ videosDelegate.updateSelection( modifier , videosGV.currentIndex, index)
+ videosGV.currentIndex = index
+ videosGV.forceActiveFocus()
+ videosGV.renderLayout()
+ }
+ }
- navigationParent: root
+ navigationParent: root
- /*
+ /*
*define the intial position/selection
* This is done on activeFocus rather than Component.onCompleted because videosDelegate.
* selectedGroup update itself after this event
@@ -152,7 +152,7 @@ Utils.NavigableFocusScope {
}
}
- }
+ }
}
@@ -175,21 +175,21 @@ Utils.NavigableFocusScope {
}
}
- Utils.StackViewExt {
- id: view
- anchors.fill:parent
- clip: true
- focus: true
- initialItem: medialib.gridView ? gridComponent : listComponent
- Connections {
- target: medialib
- onGridViewChanged: {
- if (medialib.gridView)
- view.replace(gridComponent)
- else
- view.replace(listComponent)
- }
+ Utils.StackViewExt {
+ id: view
+ anchors.fill:parent
+ clip: true
+ focus: true
+ initialItem: medialib.gridView ? gridComponent : listComponent
+ Connections {
+ target: medialib
+ onGridViewChanged: {
+ if (medialib.gridView)
+ view.replace(gridComponent)
+ else
+ view.replace(listComponent)
}
+ }
}
Label {
diff --git a/modules/gui/qt/qml/mediacenter/MusicArtistsDisplay.qml b/modules/gui/qt/qml/mediacenter/MusicArtistsDisplay.qml
index 7ab8290536..061590f4af 100644
--- a/modules/gui/qt/qml/mediacenter/MusicArtistsDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MusicArtistsDisplay.qml
@@ -149,8 +149,8 @@ Utils.NavigableFocusScope {
width: albumSubView.width
focus: false
artist: (artistList.currentIndex >= 0)
- ? delegateModel.items.get(artistList.currentIndex).model
- : ({})
+ ? delegateModel.items.get(artistList.currentIndex).model
+ : ({})
}
focus: true
diff --git a/modules/gui/qt/qml/mediacenter/NetworkListItem.qml b/modules/gui/qt/qml/mediacenter/NetworkListItem.qml
index 594c915a99..30628cc77d 100644
--- a/modules/gui/qt/qml/mediacenter/NetworkListItem.qml
+++ b/modules/gui/qt/qml/mediacenter/NetworkListItem.qml
@@ -82,8 +82,8 @@ Rectangle {
Layout.preferredHeight: VLCStyle.icon_normal
Layout.preferredWidth: VLCStyle.icon_normal
imageSource: !model.indexed ? "qrc:///buttons/playlist/playlist_add.svg" :
- ((mouse.containsMouse || activeFocus) ? "qrc:///toolbar/clear.svg" :
- "qrc:///valid.svg" )
+ ((mouse.containsMouse || activeFocus) ? "qrc:///toolbar/clear.svg" :
+ "qrc:///valid.svg" )
onClicked: {
root.indexClicked(mouse.buttons, mouse.modifiers);
}
diff --git a/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml b/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
index 8ef6eda379..384ef270e8 100644
--- a/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
+++ b/modules/gui/qt/qml/mediacenter/VideoExpandableGrid.qml
@@ -217,11 +217,11 @@ Utils.ExpandGridView {
id:reptr
anchors.fill: parent
model: [
- {label: qsTr("Rename Video"), ic: VLCIcons.rename},
- {label: qsTr("Enqueue"), ic: VLCIcons.add},
- {label: qsTr("Share"), ic: VLCIcons.lan},
- {label: qsTr("Delete"), ic: VLCIcons.del}
- ]
+ {label: qsTr("Rename Video"), ic: VLCIcons.rename},
+ {label: qsTr("Enqueue"), ic: VLCIcons.add},
+ {label: qsTr("Share"), ic: VLCIcons.lan},
+ {label: qsTr("Delete"), ic: VLCIcons.del}
+ ]
delegate: Button {
id: reptrBtn
diff --git a/modules/gui/qt/qml/player/ControlBar.qml b/modules/gui/qt/qml/player/ControlBar.qml
index 860654a610..e2fb721e1e 100644
--- a/modules/gui/qt/qml/player/ControlBar.qml
+++ b/modules/gui/qt/qml/player/ControlBar.qml
@@ -63,8 +63,8 @@ Utils.NavigableFocusScope {
Text {
text: (rootWindow.showRemainingTime && player.remainingTime.valid())
- ? "-" + player.remainingTime.toString()
- : player.length.toString()
+ ? "-" + player.remainingTime.toString()
+ : player.length.toString()
color: VLCStyle.colors.playerFg
font.pixelSize: VLCStyle.fontSize_normal
font.bold: true
diff --git a/modules/gui/qt/qml/player/Player.qml b/modules/gui/qt/qml/player/Player.qml
index d4f6423450..7e863847df 100644
--- a/modules/gui/qt/qml/player/Player.qml
+++ b/modules/gui/qt/qml/player/Player.qml
@@ -325,7 +325,7 @@ Utils.NavigableFocusScope {
id: filter
source: rootQMLView
filterEnabled: controlBarView.state === "visible"
- && (controlBarView.focus || topcontrolView.focus)
+ && (controlBarView.focus || topcontrolView.focus)
Keys.onPressed: toolbarAutoHide.setVisible(5000)
}
diff --git a/modules/gui/qt/qml/utils/ExpandGridView.qml b/modules/gui/qt/qml/utils/ExpandGridView.qml
index a7eda583ad..f1fa8f4987 100644
--- a/modules/gui/qt/qml/utils/ExpandGridView.qml
+++ b/modules/gui/qt/qml/utils/ExpandGridView.qml
@@ -442,9 +442,9 @@ NavigableFocusScope {
} else if (event.key === Qt.Key_PageDown || event.matches(StandardKey.MoveToNextPage) ||event.matches(StandardKey.SelectNextPage)) {
newIndex = Math.min(root.modelCount - 1, currentIndex + colCount * 5)
} else if (event.key === Qt.Key_Up || event.matches(StandardKey.MoveToPreviousLine) ||event.matches(StandardKey.SelectPreviousLine)) {
- if (Math.floor(currentIndex / colCount) !== 0) { //we are not on the first line
+ if (Math.floor(currentIndex / colCount) !== 0) { //we are not on the first line
newIndex = Math.max(0, currentIndex - colCount)
- }
+ }
} else if (event.key === Qt.Key_PageUp || event.matches(StandardKey.MoveToPreviousPage) ||event.matches(StandardKey.SelectPreviousPage)) {
newIndex = Math.max(0, currentIndex - colCount * 5)
}
diff --git a/modules/gui/qt/qml/utils/KeyNavigableTableView.qml b/modules/gui/qt/qml/utils/KeyNavigableTableView.qml
index 881881a8ea..5e0aa8bd2e 100644
--- a/modules/gui/qt/qml/utils/KeyNavigableTableView.qml
+++ b/modules/gui/qt/qml/utils/KeyNavigableTableView.qml
@@ -105,17 +105,17 @@ NavigableFocusScope {
color: VLCStyle.colors.bg
radius: height / 10
- Row {
- anchors {
- fill: parent
- }
- Repeater {
- model: sortModel
+ Row {
+ anchors {
+ fill: parent
+ }
+ Repeater {
+ model: sortModel
- Item {
- height: parent.height
- width: model.width * view.width
- Layout.alignment: Qt.AlignVCenter
+ Item {
+ height: parent.height
+ width: model.width * view.width
+ Layout.alignment: Qt.AlignVCenter
Loader{
anchors.fill: parent
sourceComponent: colDelegate
@@ -125,9 +125,9 @@ NavigableFocusScope {
}
+ }
}
}
- }
}
}
}
More information about the vlc-commits
mailing list