Commit f8f39c34 authored by Ludovic Fauvet's avatar Ludovic Fauvet

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

parent a1cd238d
...@@ -794,6 +794,8 @@ void PLModel::rebuild( playlist_item_t *p_root ) ...@@ -794,6 +794,8 @@ void PLModel::rebuild( playlist_item_t *p_root )
/* Invalidate cache */ /* Invalidate cache */
i_cached_id = i_cached_input_id = -1; i_cached_id = i_cached_input_id = -1;
beginResetModel();
if( rootItem ) rootItem->clearChildren(); if( rootItem ) rootItem->clearChildren();
PL_LOCK; PL_LOCK;
...@@ -808,7 +810,7 @@ void PLModel::rebuild( playlist_item_t *p_root ) ...@@ -808,7 +810,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
PL_UNLOCK; PL_UNLOCK;
/* And signal the view */ /* And signal the view */
reset(); endResetModel();
if( p_root ) emit rootIndexChanged(); if( p_root ) emit rootIndexChanged();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment