]> git.sesse.net Git - vlc/commitdiff
Qt4: small loop change
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 26 Oct 2010 16:04:57 +0000 (19:04 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 26 Oct 2010 16:05:36 +0000 (19:05 +0300)
modules/gui/qt4/components/playlist/playlist.cpp

index 7be186c1f8bf2f42dc938f27b09c8909300a7d9b..22549dd0e19d09c7f1f0e8f16f6115c29358a2c3 100644 (file)
@@ -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;