[vlc-commits] gui/qt: use vlc_playlist_locker in PLModel::filter
Filip Roséen
git at videolan.org
Wed Jul 20 16:15:55 CEST 2016
vlc | branch: master | Filip Roséen <filip at videolabs.io> | Wed Jul 20 04:37:00 2016 +0200| [dedd6f009ab25ddd39a1245c940a26a53d0f1d28] | committer: Jean-Baptiste Kempf
gui/qt: use vlc_playlist_locker in PLModel::filter
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dedd6f009ab25ddd39a1245c940a26a53d0f1d28
---
modules/gui/qt/components/playlist/playlist_model.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index fdfec49..f81328f 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -844,8 +844,9 @@ void PLModel::filter( const QString& search_text, const QModelIndex & idx, bool
latestSearch = search_text;
/** \todo Fire the search with a small delay ? */
- PL_LOCK;
{
+ vlc_playlist_locker pl_lock ( THEPL );
+
playlist_item_t *p_root = playlist_ItemGetById( p_playlist,
itemId( idx, PLAYLIST_ID ) );
assert( p_root );
@@ -863,11 +864,10 @@ void PLModel::filter( const QString& search_text, const QModelIndex & idx, bool
updateChildren( searchRoot ); // The PL_LOCK is needed here
endInsertRows();
- PL_UNLOCK;
return;
}
}
- PL_UNLOCK;
+
rebuild();
}
More information about the vlc-commits
mailing list