Commit f73e1071 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: simplification

parent 15b329e8
...@@ -433,19 +433,16 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help, ...@@ -433,19 +433,16 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help,
void DialogsProvider::addFromSimple( bool pl, bool go) void DialogsProvider::addFromSimple( bool pl, bool go)
{ {
QStringList files = DialogsProvider::showSimpleOpen(); QStringList files = DialogsProvider::showSimpleOpen();
int i = 0; int mode = go ? PLAYLIST_GO : PLAYLIST_PREPARSE;
files.sort(); files.sort();
foreach( const QString &file, files ) foreach( const QString &file, files )
{ {
char* psz_uri = make_URI( qtu( toNativeSeparators(file) ), NULL ); QString url = toURI( file );
playlist_Add( THEPL, psz_uri, NULL, playlist_Add( THEPL, qtu( url ), NULL, PLAYLIST_APPEND | mode,
go ? ( PLAYLIST_APPEND | ( i ? PLAYLIST_PREPARSE : PLAYLIST_GO ) )
: ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
PLAYLIST_END, pl, pl_Unlocked ); PLAYLIST_END, pl, pl_Unlocked );
free( psz_uri ); RecentsMRL::getInstance( p_intf )->addRecent( url );
RecentsMRL::getInstance( p_intf )->addRecent( mode = PLAYLIST_PREPARSE;
toNativeSeparators( file ) );
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