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

git at videolan.org git at videolan.org
Wed Oct 27 17:07:02 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Oct 27 18:05:15 2010 +0300| [de7b2fd2e8b58059bfe2f2ff7080385ab0a44f56] | committer: Ilkka Ollakka 

Revert "Qt4: small loop change"

This reverts commit d38706da538c117b7da468edae58c54777104081.

Changed back, as changed loop didn't do same as original did

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

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

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index aab1f48..3ebf49e 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( i.isValid() )
+    while( true )
     {
         PLItem *item = model->getItem( i );
 
@@ -271,7 +271,8 @@ void LocationBar::setIndex( const QModelIndex &index )
 
         first = false;
 
-        i = i.parent();
+        if( i.isValid() ) i = i.parent();
+        else break;
     }
 
     QString prefix;



More information about the vlc-commits mailing list