[vlc-devel] commit: Qt4: use make_path ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Feb 20 19:58:43 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 20 20:52:19 2010 +0200| [581da20c86ccbfd3bcc9badb623763f215eee8d1] | committer: Rémi Denis-Courmont
Qt4: use make_path
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=581da20c86ccbfd3bcc9badb623763f215eee8d1
---
modules/gui/qt4/components/info_panels.cpp | 15 +++++++--------
modules/gui/qt4/input_manager.cpp | 20 +++++++++-----------
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index cc5c9a1..c10cadd 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -234,14 +234,13 @@ void MetaPanel::update( input_item_t *p_item )
QString file;
char *psz_art = input_item_GetArtURL( p_item );
- if( psz_art && !strncmp( psz_art, "file://", 7 ) &&
- decode_URI( psz_art + 7 ) )
-#ifdef WIN32
- file = qfu( psz_art + 8 ); // Remove extra / on Win32 URI.
-#else
- file = qfu( psz_art + 7 );
-#endif
- free( psz_art );
+ if( psz_art )
+ {
+ char *psz = make_path( psz_art );
+ free( psz_art );
+ file = qfu( psz );
+ free( psz );
+ }
art_cover->showArtUpdate( file );
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 43beda0..695c81b 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -609,20 +609,18 @@ const QString InputManager::decodeArtURL( input_item_t *p_item )
assert( p_item );
char *psz_art = input_item_GetArtURL( p_item );
- QString url;
- if( psz_art && !strncmp( psz_art, "file://", 7 ) &&
- decode_URI( psz_art + 7 ) )
-#ifdef WIN32
- url = qfu( psz_art + 8 ); // Remove extra / starting on Win32.
-#else
- url = qfu( psz_art + 7 );
-#endif
- free( psz_art );
+ if( psz_art )
+ {
+ char *psz = make_path( psz_art );
+ free( psz_art );
+ psz_art = psz;
+ }
- url = url.replace( "file://", "" );
+#if 0
/* Taglib seems to define a attachment://, It won't work yet */
url = url.replace( "attachment://", "" );
- return url;
+#endif
+ return qfu( psz_art ? psz_art : "" );
}
void InputManager::UpdateArt()
More information about the vlc-devel
mailing list