[vlc-devel] [PATCH 8/8] qt: medialib: reorder MLBaseModel members

Romain Vimont rom1v at videolabs.io
Thu Dec 3 12:12:12 CET 2020


Avoid interleaving members with different visibilities.
---
 modules/gui/qt/medialibrary/mlbasemodel.hpp | 47 ++++++++++-----------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/modules/gui/qt/medialibrary/mlbasemodel.hpp b/modules/gui/qt/medialibrary/mlbasemodel.hpp
index 901e313b63..c058f1faf1 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.hpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.hpp
@@ -68,6 +68,26 @@ public:
 
     Q_INVOKABLE QMap<QString, QVariant> getDataAt(int index);
 
+public:
+    MLItemId parentId() const;
+    void setParentId(MLItemId parentId);
+    void unsetParentId();
+
+    MediaLib* ml() const;
+    void setMl(MediaLib* ml);
+
+    const QString& searchPattern() const;
+    void setSearchPattern( const QString& pattern );
+
+    Qt::SortOrder getSortOrder() const;
+    void setSortOder(Qt::SortOrder order);
+    const QString getSortCriteria() const;
+    void setSortCriteria(const QString& criteria);
+    void unsetSortCriteria();
+
+    int rowCount(const QModelIndex &parent = {}) const;
+    virtual unsigned int getCount() const;
+
 signals:
     void parentIdChanged();
     void resetRequested();
@@ -81,9 +101,6 @@ protected slots:
     void onLocalSizeChanged(size_t size);
     void onLocalDataChanged(size_t index, size_t count);
 
-private:
-    static void onVlcMlEvent( void* data, const vlc_ml_event_t* event );
-
 protected:
     virtual void clear();
     virtual vlc_ml_sorting_criteria_t roleToCriteria(int role) const = 0;
@@ -122,27 +139,6 @@ protected:
         bool m_sort_desc;
     };
 
-public:
-    MLItemId parentId() const;
-    void setParentId(MLItemId parentId);
-    void unsetParentId();
-
-    MediaLib* ml() const;
-    void setMl(MediaLib* ml);
-
-    const QString& searchPattern() const;
-    void setSearchPattern( const QString& pattern );
-
-    Qt::SortOrder getSortOrder() const;
-    void setSortOder(Qt::SortOrder order);
-    const QString getSortCriteria() const;
-    void setSortCriteria(const QString& criteria);
-    void unsetSortCriteria();
-
-    int rowCount(const QModelIndex &parent = {}) const;
-    virtual unsigned int getCount() const;
-
-protected:
     MLItemId m_parent;
 
     vlc_medialibrary_t* m_ml;
@@ -156,6 +152,9 @@ protected:
     bool m_need_reset;
 
     mutable std::unique_ptr<ListCache<std::unique_ptr<MLItem>>> m_cache;
+
+private:
+    static void onVlcMlEvent( void* data, const vlc_ml_event_t* event );
 };
 
 #endif // MLBASEMODEL_HPP
-- 
2.29.2



More information about the vlc-devel mailing list