[vlc-devel] [PATCH 11/19] qt: make playlist model itemAt() invokable

Fatih Uzunoglu fuzun54 at outlook.com
Wed Aug 12 23:17:18 CEST 2020


---
 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);
-- 
2.25.1



More information about the vlc-devel mailing list