[vlc-commits] qt: make playlist model itemAt() invokable

Fatih Uzunoglu git at videolan.org
Tue Aug 18 17:15:05 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Wed Jul 29 22:26:45 2020 +0300| [e315da0a00a17d29d5c269be2ffd7e8c8530b50c] | committer: Pierre Lamot

qt: make playlist model itemAt() invokable

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

 modules/gui/qt/playlist/playlist_model.cpp | 2 +-
 modules/gui/qt/playlist/playlist_model.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/playlist/playlist_model.cpp b/modules/gui/qt/playlist/playlist_model.cpp
index 7bb5960fc2..65b49554ee 100644
--- a/modules/gui/qt/playlist/playlist_model.cpp
+++ b/modules/gui/qt/playlist/playlist_model.cpp
@@ -325,7 +325,7 @@ PlaylistListModel::getDuration() const
     return VLCTick(d->m_duration);
 }
 
-const PlaylistItem &
+PlaylistItem
 PlaylistListModel::itemAt(int index) const
 {
     Q_D(const PlaylistListModel);
diff --git a/modules/gui/qt/playlist/playlist_model.hpp b/modules/gui/qt/playlist/playlist_model.hpp
index 9ff02651cc..fdf487316e 100644
--- a/modules/gui/qt/playlist/playlist_model.hpp
+++ b/modules/gui/qt/playlist/playlist_model.hpp
@@ -65,7 +65,7 @@ public:
                   int role = Qt::DisplayRole) const override;
 
     /* provided for convenience */
-    const PlaylistItem &itemAt(int index) const;
+    Q_INVOKABLE PlaylistItem itemAt(int index) const;
 
     Q_INVOKABLE virtual void removeItems(const QList<int> &indexes);
     Q_INVOKABLE virtual void moveItemsPre(const QList<int> &indexes, int preTarget);



More information about the vlc-commits mailing list