[vlc-commits] qt: medialib: do not fetch data on rowCount()

Romain Vimont git at videolan.org
Thu Nov 12 15:48:05 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Mon Nov  9 10:58:12 2020 +0100| [f1c776b6445b160cb202fef76ba7438e10f604cf] | committer: Alexandre Janniaux

qt: medialib: do not fetch data on rowCount()

A call to rowCount() only needs the number of items, there is no need to
fetch the actual data.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

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

 modules/gui/qt/medialibrary/mlbasemodel.hpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/mlbasemodel.hpp b/modules/gui/qt/medialibrary/mlbasemodel.hpp
index 04be2725aa..5ee4bc8026 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.hpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.hpp
@@ -150,7 +150,6 @@ public:
             vlc_mutex_locker lock( &m_item_lock );
             if ( m_initialized == false )
             {
-                m_item_list = const_cast<MLSlidingWindowModel<T>*>(this)->fetch();
                 m_total_count = countTotalElements();
                 m_initialized = true;
                 countHasChanged = true;



More information about the vlc-commits mailing list