[vlc-devel] [PATCH 26/55] qml: remove unnecessary property binding

Fatih Uzunoglu fuzun54 at outlook.com
Thu Jan 7 21:36:39 UTC 2021


modelCount is already bound in the parent item (KeyNavigableListView)
---
 modules/gui/qt/playlist/qml/PlaylistListView.qml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index e43f4d0ace..199b85f4c8 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -268,7 +268,6 @@ Widgets.NavigableFocusScope {
                 model: PlaylistListModel {
                     playlistId: mainctx.playlist
                 }
-                modelCount: root.model.count
 
                 fadeColor: parentRect.color
 
@@ -287,9 +286,8 @@ Widgets.NavigableFocusScope {
                     }
                     onSelectedCountChanged: {
                         var selectedIndexes = root.model.getSelection()
-                        var modelCount = root.model.count
 
-                        if (modelCount === 0 || selectedIndexes.length === 0)
+                        if (listView.modelCount === 0 || selectedIndexes.length === 0)
                             return
 
                         var bottomItemIndex = listView.listView.indexAt(listView.listView.contentX, (listView.listView.contentY + listView.height) - 2)
-- 
2.27.0



More information about the vlc-devel mailing list