[vlc-commits] commit: Qt4: small loop change (Ilkka Ollakka )

git at videolan.org git at videolan.org
Tue Oct 26 18:08:46 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Oct 26 19:04:57 2010 +0300| [d38706da538c117b7da468edae58c54777104081] | committer: Ilkka Ollakka 

Qt4: small loop change

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

 modules/gui/qt4/components/playlist/playlist.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index 7be186c..22549dd 100644
--- a/modules/gui/qt4/components/playlist/playlist.cpp
+++ b/modules/gui/qt4/components/playlist/playlist.cpp
@@ -250,7 +250,7 @@ void LocationBar::setIndex( const QModelIndex &index )
     QModelIndex i = index;
     bool first = true;
 
-    while( true )
+    while( i.isValid() )
     {
         PLItem *item = model->getItem( i );
 
@@ -271,8 +271,7 @@ void LocationBar::setIndex( const QModelIndex &index )
 
         first = false;
 
-        if( i.isValid() ) i = i.parent();
-        else break;
+        i = i.parent();
     }
 
     QString prefix;



More information about the vlc-commits mailing list