[vlc-devel] commit: qt4: ensure uri-encoded files are passed to the core (Erwan Tulou )
git version control
git at videolan.org
Mon Aug 24 18:19:32 CEST 2009
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Aug 22 14:27:33 2009 +0200| [96998812a21d05d8711db846e37df91cebc8eac0] | committer: Erwan Tulou
qt4: ensure uri-encoded files are passed to the core
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96998812a21d05d8711db846e37df91cebc8eac0
---
modules/gui/qt4/dialogs/open.cpp | 4 +++-
modules/gui/qt4/dialogs/open.hpp | 1 +
modules/gui/qt4/dialogs_provider.cpp | 4 +++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index b2e3d7e..487745c 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -339,7 +339,9 @@ void OpenDialog::finish( bool b_enqueue = false )
bool b_start = !i && !b_enqueue;
input_item_t *p_input;
- p_input = input_item_New( p_intf, qtu( itemsMRL[i] ), NULL );
+ char* psz_uri = make_URI( qtu( itemsMRL[i] ) );
+ p_input = input_item_New( p_intf, psz_uri, NULL );
+ free( psz_uri );
/* Insert options only for the first element.
We don't know how to edit that anyway. */
diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp
index 7ba13fc..d7f60bd 100644
--- a/modules/gui/qt4/dialogs/open.hpp
+++ b/modules/gui/qt4/dialogs/open.hpp
@@ -29,6 +29,7 @@
#endif
#include <vlc_common.h>
+#include <vlc_url.h>
#include "util/qvlcframe.hpp"
#include "ui/open.h"
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index aa04f89..91ab27d 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -418,10 +418,12 @@ void DialogsProvider::addFromSimple( bool pl, bool go)
files.sort();
foreach( const QString &file, files )
{
- playlist_Add( THEPL, qtu( toNativeSeparators( file ) ), NULL,
+ char* psz_uri = make_URI( qtu( file ) );
+ playlist_Add( THEPL, psz_uri, NULL,
go ? ( PLAYLIST_APPEND | ( i ? PLAYLIST_PREPARSE : PLAYLIST_GO ) )
: ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
PLAYLIST_END, pl, pl_Unlocked );
+ free( psz_uri );
RecentsMRL::getInstance( p_intf )->addRecent(
toNativeSeparators( file ) );
i++;
More information about the vlc-devel
mailing list