vlc | branch: master | Pierre Lamot <[email protected]> | Wed Oct  9 19:11:23 
2019 +0200| [0e1dcf57ad1d66ce276ea72734283dacd39b67d1] | committer: Thomas 
Guillem

qml: MultiCoverPreview: clean up repeater

albums.get should be removed and the count property is useless.

Signed-off-by: Thomas Guillem <[email protected]>

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

 modules/gui/qt/qml/utils/MultiCoverPreview.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/utils/MultiCoverPreview.qml 
b/modules/gui/qt/qml/utils/MultiCoverPreview.qml
index 5fc3c345bd..2dc9e3e2c6 100644
--- a/modules/gui/qt/qml/utils/MultiCoverPreview.qml
+++ b/modules/gui/qt/qml/utils/MultiCoverPreview.qml
@@ -33,6 +33,7 @@
 
 import QtQuick 2.11
 import QtQuick.Layouts 1.3
+import org.videolan.medialib 0.1
 import "qrc:///style"
 
 Item {
@@ -49,7 +50,6 @@ Item {
         rowSpacing: VLCStyle.margin_xxxsmall
 
         Repeater {
-            property int count: albums.rowCount()
             model: Math.min(albums.rowCount(), 4)
 
             /* One cover */
@@ -60,7 +60,7 @@ Item {
                 Layout.columnSpan: albums.rowCount() === 1 ? 2 : 1
                 Layout.fillHeight: true
                 Layout.fillWidth: true
-                source: albums.get(index).cover || VLCStyle.noArtAlbum
+                source: albums.data(albums.index(index, 0), 
MLAlbumModel.ALBUM_COVER) || VLCStyle.noArtAlbum
                 fillMode: Image.PreserveAspectCrop
                 sourceSize: Qt.size(width, height)
             }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to