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

Ludovic Fauvet git at videolan.org
Fri Jul 19 12:53:24 CEST 2013


vlc/vlc-2.1 | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Jul 15 11:23:17 2013 +0200| [6688e80cc1e4c61637cfa5bb6eb32ae79391014f] | committer: Jean-Baptiste Kempf

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

(cherry picked from commit f8f39c346d759c029e1f3d8baf33c73c1bc9e18b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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