[vlc-commits] commit: Qt4: FileOpenPanel generates proper URLs, simplify ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Nov 10 17:24:13 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 10 18:21:47 2010 +0200| [cf3f7fdbcd20db54f600116df87de6c3b3b64e51] | committer: Rémi Denis-Courmont 

Qt4: FileOpenPanel generates proper URLs, simplify

This fixes the streaming wizard. We can now remove a few make_URI()
calls.

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

 modules/gui/qt4/components/open_panels.cpp |    4 ++--
 modules/gui/qt4/dialogs/open.cpp           |    4 +---
 modules/gui/qt4/dialogs_provider.cpp       |    5 +----
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index fb7878b..ce95924 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -279,13 +279,13 @@ void FileOpenPanel::updateMRL()
         for( int i = 0; i < ui.fileListWidg->count(); i++ )
         {
             if( !ui.fileListWidg->item( i )->text().isEmpty() )
-                fileList << ui.fileListWidg->item( i )->text();
+                fileList << toURI(ui.fileListWidg->item( i )->text());
         }
     else
     {
         fileList = dialogBox->selectedFiles();
         for( int i = 0; i < fileList.count(); i++ )
-            fileList[i] = toNativeSeparators( fileList[i] );
+            fileList[i] = toURI( fileList[i] );
     }
 
     /* Options */
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index 29aa55d..6cd52e3 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -350,9 +350,7 @@ void OpenDialog::finish( bool b_enqueue = false )
         bool b_start = !i && !b_enqueue;
 
         input_item_t *p_input;
-        char* psz_uri = make_URI( qtu( itemsMRL[i] ), "file" );
-        p_input = input_item_New( p_intf, psz_uri, NULL );
-        free( psz_uri );
+        p_input = input_item_New( p_intf, qtu( itemsMRL[i] ), NULL );
 
         /* Insert options only for the first element.
            We don't know how to edit that anyway. */
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 09fac98..97a754b 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -729,10 +729,7 @@ void DialogsProvider::SDMenuAction( const QString& data )
  **/
 void DialogsProvider::playMRL( const QString &mrl )
 {
-    char* psz_uri = make_URI( qtu(mrl), NULL );
-    playlist_Add( THEPL, psz_uri, NULL,
+    playlist_Add( THEPL, qtu(mrl), NULL,
            PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false );
-    free( psz_uri );
-
     RecentsMRL::getInstance( p_intf )->addRecent( mrl );
 }



More information about the vlc-commits mailing list