[vlc-commits] qml: use history calls without the Go parameter as this is the default now
Pierre Lamot
git at videolan.org
Fri Feb 14 11:59:51 CET 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Jan 28 10:38:48 2020 +0100| [2b1126535619e0f4c3c257fd6303e6f6c9820440] | committer: Jean-Baptiste Kempf
qml: use history calls without the Go parameter as this is the default now
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b1126535619e0f4c3c257fd6303e6f6c9820440
---
modules/gui/qt/dialogs/help/qml/About.qml | 2 +-
modules/gui/qt/maininterface/qml/BannerSources.qml | 4 ++--
modules/gui/qt/maininterface/qml/MainInterface.qml | 16 ++++++++--------
modules/gui/qt/medialibrary/qml/MainDisplay.qml | 4 ++--
modules/gui/qt/medialibrary/qml/MusicDisplay.qml | 2 +-
modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml | 10 +++++-----
modules/gui/qt/menus/qml/HelpMenu.qml | 2 +-
modules/gui/qt/network/qml/NetworkBrowseDisplay.qml | 6 +++---
.../gui/qt/network/qml/NetworksSectionSelectableDM.qml | 6 +++---
modules/gui/qt/player/qml/ControlBar.qml | 2 +-
modules/gui/qt/player/qml/ControlButtons.qml | 2 +-
modules/gui/qt/player/qml/MiniPlayer.qml | 4 ++--
modules/gui/qt/player/qml/TopBar.qml | 2 +-
13 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/modules/gui/qt/dialogs/help/qml/About.qml b/modules/gui/qt/dialogs/help/qml/About.qml
index c4522740b1..2287ba3c6a 100644
--- a/modules/gui/qt/dialogs/help/qml/About.qml
+++ b/modules/gui/qt/dialogs/help/qml/About.qml
@@ -99,7 +99,7 @@ Widgets.NavigableFocusScope {
KeyNavigation.right: textScroll
onClicked: {
- history.previous(History.Go)
+ history.previous()
}
}
}
diff --git a/modules/gui/qt/maininterface/qml/BannerSources.qml b/modules/gui/qt/maininterface/qml/BannerSources.qml
index 90da5569a5..412ca53492 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -104,7 +104,7 @@ Widgets.NavigableFocusScope {
size: VLCStyle.icon_normal
iconText: VLCIcons.topbar_previous
text: i18n.qtr("Previous")
- onClicked: history.previous(History.Go)
+ onClicked: history.previous()
enabled: !history.previousEmpty
}
@@ -113,7 +113,7 @@ Widgets.NavigableFocusScope {
size: VLCStyle.icon_normal
iconText: VLCIcons.topbar_next
text: i18n.qtr("Next")
- onClicked: history.next(History.Go)
+ onClicked: history.next()
enabled: !history.nextEmpty
}
}
diff --git a/modules/gui/qt/maininterface/qml/MainInterface.qml b/modules/gui/qt/maininterface/qml/MainInterface.qml
index 8349f76086..f383c90c39 100644
--- a/modules/gui/qt/maininterface/qml/MainInterface.qml
+++ b/modules/gui/qt/maininterface/qml/MainInterface.qml
@@ -76,7 +76,7 @@ Rectangle {
focus: true
onActionCancel: {
console.log("onActionCancel")
- history.previous(History.Go)
+ history.previous()
}
}
}
@@ -105,13 +105,13 @@ Rectangle {
function setInitialView() {
//set the initial view
if (!mainPlaylistController.empty)
- history.push(["player"], History.Go)
+ history.push(["player"])
else
{
if (medialib)
- history.push(["mc", "video"], History.Go)
+ history.push(["mc", "video"])
else
- history.push(["playlist"], History.Go)
+ history.push(["playlist"])
}
}
@@ -151,12 +151,12 @@ Rectangle {
if (history.previousEmpty)
{
if (medialib)
- history.push(["mc", "video"], History.Go)
+ history.push(["mc", "video"])
else
- history.push(["playlist"], History.Go)
+ history.push(["playlist"])
}
else
- history.previous(History.Go)
+ history.previous()
}
}
}
@@ -167,7 +167,7 @@ Rectangle {
if (player.videoTracks.rowCount() > 0
&& player.playingState === PlayerController.PLAYING_STATE_PLAYING
&& history.current.view !== "player") {
- history.push(["player"], History.Go)
+ history.push(["player"])
}
}
}
diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 200876487b..07c8ba5681 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -61,7 +61,7 @@ Widgets.NavigableFocusScope {
}
navigationCancel: function() {
- history.previous(History.Go)
+ history.previous()
}
Keys.onPressed: {
@@ -170,7 +170,7 @@ Widgets.NavigableFocusScope {
sourcesBanner.subTabModel = undefined
var name = root.tabModel.get(index).name
selectedIndex = index
- history.push(["mc", name], History.Go)
+ history.push(["mc", name])
}
onSubItemClicked: {
diff --git a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
index 40b3091713..54363d0450 100644
--- a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
@@ -56,7 +56,7 @@ Widgets.NavigableFocusScope {
}
function loadIndex(index) {
- history.push(["mc", "music", root.pageModel[index].name], History.Go)
+ history.push(["mc", "music", root.pageModel[index].name])
}
Component { id: albumComp; MusicAlbumsDisplay{ navigationParent: root } }
diff --git a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
index 1bdaa3f686..9cd7e521eb 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
@@ -32,8 +32,8 @@ Widgets.NavigableFocusScope {
{ text: i18n.qtr("Alphabetic"), criteria: "title" }
]
- function goToView( parent ) {
- history.push([ "mc", "music", "albums", { parentId: parent } ], History.Go)
+ function showAlbumView( parent ) {
+ history.push([ "mc", "music", "albums", { parentId: parent } ])
}
navigationCancel: function() {
@@ -76,7 +76,7 @@ Widgets.NavigableFocusScope {
medialib.addAndPlay( model.id )
}
onItemDoubleClicked: {
- history.push([ "mc", "music", "albums", { parentId: model.id } ], History.Go)
+ root.showAlbumView(model.id)
}
onAddToPlaylistClicked: {
console.log('Clicked on addToPlaylist : '+model.name);
@@ -92,7 +92,7 @@ Widgets.NavigableFocusScope {
list.push(delegateModel.selectedGroup.get(i).model.id)
medialib.addAndPlay( list )
} else if (delegateModel.selectedGroup.count === 1) {
- goToView(delegateModel.selectedGroup.get(0).model.id)
+ showAlbumView(delegateModel.selectedGroup.get(0).model.id)
}
}
}
@@ -135,7 +135,7 @@ Widgets.NavigableFocusScope {
}
onItemDoubleClicked: {
- history.push(["mc", "music", "albums", { parentId: model.id } ], History.Go)
+ root.showAlbumView(model.id)
}
}
diff --git a/modules/gui/qt/menus/qml/HelpMenu.qml b/modules/gui/qt/menus/qml/HelpMenu.qml
index f92c6dd13c..d51b13305b 100644
--- a/modules/gui/qt/menus/qml/HelpMenu.qml
+++ b/modules/gui/qt/menus/qml/HelpMenu.qml
@@ -24,5 +24,5 @@ import "qrc:///widgets/" as Widgets
Widgets.MenuExt {
Action { text: i18n.qtr("&Help"); onTriggered: dialogProvider.helpDialog(); icon.source: "qrc:/menu/help.svg"; shortcut: "F1" }
Action { text: i18n.qtr("Check for &Updates..."); onTriggered: dialogProvider.updateDialog(); }
- Action { text: i18n.qtr("&About"); onTriggered: history.push(["about"], History.Go); icon.source: "qrc:/menu/info.svg"; shortcut: "Shift+F1" }
+ Action { text: i18n.qtr("&About"); onTriggered: history.push(["about"]); icon.source: "qrc:/menu/info.svg"; shortcut: "Shift+F1" }
}
diff --git a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
index e5d972804f..74e87d4f00 100644
--- a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
+++ b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
@@ -162,7 +162,7 @@ Widgets.NavigableFocusScope {
onItemDoubleClicked: {
if (model.type === NetworkMediaModel.TYPE_NODE || model.type === NetworkMediaModel.TYPE_DIRECTORY)
- history.push( ["mc", "network", { tree: model.tree } ], History.Go)
+ history.push( ["mc", "network", { tree: model.tree } ])
else
delegateModel.model.addAndPlay( index )
}
@@ -181,7 +181,7 @@ Widgets.NavigableFocusScope {
navigationParent: root
navigationUpItem: gridView.headerItem
navigationCancel: function() {
- history.previous(History.Go)
+ history.previous()
}
}
}
@@ -206,7 +206,7 @@ Widgets.NavigableFocusScope {
navigationParent: root
navigationUpItem: listView.headerItem
navigationCancel: function() {
- history.previous(History.Go)
+ history.previous()
}
header: Widgets.LabelSeparator {
diff --git a/modules/gui/qt/network/qml/NetworksSectionSelectableDM.qml b/modules/gui/qt/network/qml/NetworksSectionSelectableDM.qml
index 3c73823a70..5d3da53551 100644
--- a/modules/gui/qt/network/qml/NetworksSectionSelectableDM.qml
+++ b/modules/gui/qt/network/qml/NetworksSectionSelectableDM.qml
@@ -47,7 +47,7 @@ Util.SelectableDelegateModel {
onItemDoubleClicked: {
if (model.type === NetworkMediaModel.TYPE_NODE || model.type === NetworkMediaModel.TYPE_DIRECTORY)
- history.push( ["mc", "network", { tree: model.tree } ], History.Go)
+ history.push( ["mc", "network", { tree: model.tree } ])
else
delegateModel.model.addAndPlay( index )
}
@@ -72,7 +72,7 @@ Util.SelectableDelegateModel {
onItemDoubleClicked: {
if (model.type === NetworkMediaModel.TYPE_NODE || model.type === NetworkMediaModel.TYPE_DIRECTORY)
- history.push( ["mc", "network", { tree: model.tree } ], History.Go)
+ history.push( ["mc", "network", { tree: model.tree } ])
else
delegateModel.model.addAndPlay( index )
}
@@ -123,7 +123,7 @@ Util.SelectableDelegateModel {
} else {
if (delegateModel.items.get(index).model.type === NetworkMediaModel.TYPE_DIRECTORY
|| delegateModel.items.get(index).model.type === NetworkMediaModel.TYPE_NODE) {
- history.push(["mc", "network", { tree: delegateModel.items.get(index).model.tree }], History.Go);
+ history.push(["mc", "network", { tree: delegateModel.items.get(index).model.tree }]);
} else {
playSelection()
}
diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index 1748f6b426..7460d31e56 100644
--- a/modules/gui/qt/player/qml/ControlBar.qml
+++ b/modules/gui/qt/player/qml/ControlBar.qml
@@ -39,7 +39,7 @@ Widgets.NavigableFocusScope {
Keys.priority: Keys.AfterItem
Keys.onPressed: defaultKeyAction(event, 0)
- onActionCancel: history.previous(History.Go)
+ onActionCancel: history.previous()
implicitHeight: columnLayout.implicitHeight
diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml
index 4143a811b9..eb77c4c432 100644
--- a/modules/gui/qt/player/qml/ControlButtons.qml
+++ b/modules/gui/qt/player/qml/ControlButtons.qml
@@ -104,7 +104,7 @@ Item{
size: VLCStyle.icon_medium
iconText: VLCIcons.exit
text: i18n.qtr("Back")
- onClicked: history.previous(History.Go)
+ onClicked: history.previous()
property bool acceptFocus: true
}
}
diff --git a/modules/gui/qt/player/qml/MiniPlayer.qml b/modules/gui/qt/player/qml/MiniPlayer.qml
index 44fd52b0e7..60c390e825 100644
--- a/modules/gui/qt/player/qml/MiniPlayer.qml
+++ b/modules/gui/qt/player/qml/MiniPlayer.qml
@@ -72,7 +72,7 @@ Widgets.NavigableFocusScope {
MouseArea {
anchors.fill: parent
- onClicked: history.push(["player"], History.Go)
+ onClicked: history.push(["player"])
}
Keys.onPressed: {
@@ -82,7 +82,7 @@ Widgets.NavigableFocusScope {
}
Keys.onReleased: {
if (!event.accepted && KeyHelper.matchOk(event))
- history.push(["player"], History.Go)
+ history.push(["player"])
}
Row {
diff --git a/modules/gui/qt/player/qml/TopBar.qml b/modules/gui/qt/player/qml/TopBar.qml
index 4853570abd..8eb154b009 100644
--- a/modules/gui/qt/player/qml/TopBar.qml
+++ b/modules/gui/qt/player/qml/TopBar.qml
@@ -76,7 +76,7 @@ Widgets.NavigableFocusScope{
if (player.hasVideoOutput) {
mainPlaylistController.stop()
}
- history.previous(History.Go)
+ history.previous()
}
KeyNavigation.right: resumeDialog.visible ? resumeDialog : playlistBtn
focus: true
More information about the vlc-commits
mailing list