[vlc-commits] qml/PlaylistMediaList: Update '_actionAtIndex' implementation

Benjamin Arnaud git at videolan.org
Mon Apr 12 08:43:43 UTC 2021


vlc | branch: master | Benjamin Arnaud <benjamin.arnaud at videolabs.io> | Tue Mar 30 10:51:38 2021 +0200| [f5016d76bfa982bb1c0134fb13e238306d03a9a4] | committer: Pierre Lamot

qml/PlaylistMediaList: Update '_actionAtIndex' implementation

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5016d76bfa982bb1c0134fb13e238306d03a9a4
---

 modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml b/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
index 1bbdec00e4..2f551a4436 100644
--- a/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
+++ b/modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
@@ -136,12 +136,12 @@ Widgets.NavigableFocusScope {
     //---------------------------------------------------------------------------------------------
     // Private
 
-    function _actionAtIndex(index) {
+    function _actionAtIndex() {
         if (modelSelect.selectedIndexes.length > 1) {
             medialib.addAndPlay(model.getIdsForIndexes(modelSelect.selectedIndexes));
         } else if (modelSelect.selectedIndexes.length === 1) {
-            var indexes = modelSelect.selectedIndexes[0];
-            showList(model.getDataAt(indexes));
+            var index = modelSelect.selectedIndexes[0];
+            showList(model.getDataAt(index));
         }
     }
 
@@ -244,7 +244,7 @@ Widgets.NavigableFocusScope {
 
             onSelectionUpdated: modelSelect.updateSelection(keyModifiers, oldIndex, newIndex)
 
-            onActionAtIndex: _actionAtIndex(index)
+            onActionAtIndex: _actionAtIndex()
 
             //-------------------------------------------------------------------------------------
             // Childs
@@ -384,7 +384,7 @@ Widgets.NavigableFocusScope {
             //-------------------------------------------------------------------------------------
             // Events
 
-            onActionForSelection: _actionAtIndex(selection)
+            onActionForSelection: _actionAtIndex()
 
             onItemDoubleClicked: showList(model)
 



More information about the vlc-commits mailing list