[vlc-commits] Qt4: only apply search to inserted items when search isn't empty
Ilkka Ollakka
git at videolan.org
Sun Jan 22 00:39:12 CET 2012
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Jan 22 01:36:32 2012 +0200| [f043aa0e11894803f8b0f6f9f940a660d3a36069] | committer: Ilkka Ollakka
Qt4: only apply search to inserted items when search isn't empty
This means we don't rebuild() everything with every item when we populate
playlist without search
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f043aa0e11894803f8b0f6f9f940a660d3a36069
---
.../gui/qt4/components/playlist/playlist_model.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index fa9bd97..a248ed3 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -654,6 +654,7 @@ void PLModel::processItemAppend( int i_item, int i_parent )
if( newItem->inputItem() == THEMIM->currentInputItem() )
emit currentIndexChanged( index( newItem, 0 ) );
+ if( latestSearch.isEmpty() ) return;
search( latestSearch, index( rootItem, 0), false /*FIXME*/ );
}
More information about the vlc-commits
mailing list