[vlc-devel] commit: Qt4: no need to try to search and replace when we know that the QString is empty . ( Rémi Duraffort )

git version control git at videolan.org
Tue May 26 10:45:54 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue May 26 00:32:19 2009 +0200| [ab0a085692858b53b541157765def713af1784b0] | committer: Rémi Duraffort 

Qt4: no need to try to search and replace when we know that the QString is empty.

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

 modules/gui/qt4/input_manager.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 82bdb04..59d70ce 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -592,10 +592,12 @@ void InputManager::UpdateArt()
         char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
         url = qfu( psz_art );
         free( psz_art );
+
+        url = url.replace( "file://", "" );
+        /* Taglib seems to define a attachment://, It won't work yet */
+        url = url.replace( "attachment://", "" );
     }
-    url = url.replace( "file://", QString("" ) );
-    /* Taglib seems to define a attachment://, It won't work yet */
-    url = url.replace( "attachment://", QString("" ) );
+
     /* Update Art meta */
     emit artChanged( url );
 }




More information about the vlc-devel mailing list