[vlc-commits] Qt: reset() within a QAbstractItemModel has been deprecated in Qt5

Ludovic Fauvet git at videolan.org
Mon Jul 15 16:56:47 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Jul 15 11:23:17 2013 +0200| [f8f39c346d759c029e1f3d8baf33c73c1bc9e18b] | committer: Ludovic Fauvet

Qt: reset() within a QAbstractItemModel has been deprecated in Qt5

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

 modules/gui/qt4/components/playlist/playlist_model.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index cc25c3e..4a72025 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -794,6 +794,8 @@ void PLModel::rebuild( playlist_item_t *p_root )
     /* Invalidate cache */
     i_cached_id = i_cached_input_id = -1;
 
+    beginResetModel();
+
     if( rootItem ) rootItem->clearChildren();
 
     PL_LOCK;
@@ -808,7 +810,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
     PL_UNLOCK;
 
     /* And signal the view */
-    reset();
+    endResetModel();
     if( p_root ) emit rootIndexChanged();
 }
 



More information about the vlc-commits mailing list