[vlc-commits] qml: MultiCoverPreview: clean up repeater

Pierre Lamot git at videolan.org
Tue Oct 15 15:01:54 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | 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 <thomas at gllm.fr>

> 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)
             }



More information about the vlc-commits mailing list