Commit 96998812 authored by Erwan Tulou's avatar Erwan Tulou

qt4: ensure uri-encoded files are passed to the core

parent 84ade0ea
...@@ -339,7 +339,9 @@ void OpenDialog::finish( bool b_enqueue = false ) ...@@ -339,7 +339,9 @@ void OpenDialog::finish( bool b_enqueue = false )
bool b_start = !i && !b_enqueue; bool b_start = !i && !b_enqueue;
input_item_t *p_input; 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. /* Insert options only for the first element.
We don't know how to edit that anyway. */ We don't know how to edit that anyway. */
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#endif #endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_url.h>
#include "util/qvlcframe.hpp" #include "util/qvlcframe.hpp"
#include "ui/open.h" #include "ui/open.h"
......
...@@ -418,10 +418,12 @@ void DialogsProvider::addFromSimple( bool pl, bool go) ...@@ -418,10 +418,12 @@ void DialogsProvider::addFromSimple( bool pl, bool go)
files.sort(); files.sort();
foreach( const QString &file, files ) 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 ) ) go ? ( PLAYLIST_APPEND | ( i ? PLAYLIST_PREPARSE : PLAYLIST_GO ) )
: ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ), : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
PLAYLIST_END, pl, pl_Unlocked ); PLAYLIST_END, pl, pl_Unlocked );
free( psz_uri );
RecentsMRL::getInstance( p_intf )->addRecent( RecentsMRL::getInstance( p_intf )->addRecent(
toNativeSeparators( file ) ); toNativeSeparators( file ) );
i++; i++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment