[vlc-devel] [PATCH 22/55] qml: create PlaylistListModel instance in listView instead of root

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


---
 modules/gui/qt/playlist/qml/PlaylistListView.qml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index 1036bc657c..c5a44df265 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -30,9 +30,7 @@ import "qrc:///style/"
 Widgets.NavigableFocusScope {
     id: root
 
-    property var model: PlaylistListModel {
-        playlistId: mainctx.playlist
-    }
+    property alias model: listView.model
 
     property int leftPadding: 0
     property int rightPadding: 0
@@ -245,7 +243,9 @@ Widgets.NavigableFocusScope {
 
                 focus: true
 
-                model: root.model
+                model: PlaylistListModel {
+                    playlistId: mainctx.playlist
+                }
                 modelCount: root.model.count
 
                 fadeColor: root.backgroundColor
-- 
2.27.0



More information about the vlc-devel mailing list