[vlc-commits] commit: Qt4: fix opening DVD directory with special characters ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Jul 7 21:02:56 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul  7 22:02:43 2010 +0300| [14d8ecbae40eaac0daa112beacad2207800c1d10] | committer: Rémi Denis-Courmont 

Qt4: fix opening DVD directory with special characters

(cherry picked from commit 6e4f7493b073e405a03e977adb52085924740fd5)

Conflicts:

	modules/gui/qt4/dialogs_provider.cpp

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

 modules/gui/qt4/dialogs_provider.cpp |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 586485c..797b9ed 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -500,20 +500,14 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
     if( dir.isEmpty() )
         return;
 
-    QString mrl;
+    char *uri = make_URI( qtu( dir ) );
+    if( unlikely(uri == NULL) )
+        return;
 
-    if( dir.endsWith( "/VIDEO_TS", Qt::CaseInsensitive ) )
-        mrl = qfu("dvd://") + toNativeSeparators( dir );
-    else
-    {
-        char *uri = make_URI( qtu( dir ) );
-        if( unlikely(uri == NULL) )
-            return;
-        mrl = qfu(uri);
-        free( uri );
-    }
+    RecentsMRL::getInstance( p_intf )->addRecent( qfu(uri) );
 
-    input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
+    input_item_t *p_input = input_item_New( THEPL, uri, NULL );
+    free( uri );
     if( unlikely( p_input == NULL ) )
         return;
 
@@ -521,7 +515,6 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
     playlist_AddInput( THEPL, p_input,
                       go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
                        PLAYLIST_END, pl, pl_Unlocked );
-    RecentsMRL::getInstance( p_intf )->addRecent( mrl );
     if( !go )
         input_Read( THEPL, p_input );
     vlc_gc_decref( p_input );



More information about the vlc-commits mailing list