X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs_provider.cpp;h=f150b0eceb431c1f1bba302018d3a25c4d984405;hb=c8986a40d495702b6ef9b43e818dcbd626fa2220;hp=c2f7f836f958e51df93656cf3e11ced270764b68;hpb=d8e0025ed30fb425875118c224f78b97b5fce4b0;p=vlc diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp index c2f7f836f9..f150b0eceb 100644 --- a/modules/gui/qt4/dialogs_provider.cpp +++ b/modules/gui/qt4/dialogs_provider.cpp @@ -373,9 +373,9 @@ void DialogsProvider::MLAppendDialog( int tab ) /** * Simple open ***/ -QStringList DialogsProvider::showSimpleOpen( QString help, +QStringList DialogsProvider::showSimpleOpen( const QString& help, int filters, - QString path ) + const QString& path ) { QString fileTypes = ""; if( filters & EXT_FILTER_MEDIA ) { @@ -419,11 +419,9 @@ void DialogsProvider::addFromSimple( bool pl, bool go) foreach( const QString &file, files ) { playlist_Add( THEPL, qtu( toNativeSeparators( file ) ), NULL, - go ? ( PLAYLIST_APPEND | ( i ? 0 : PLAYLIST_GO ) | - ( i ? PLAYLIST_PREPARSE : 0 ) ) + go ? ( PLAYLIST_APPEND | ( i ? PLAYLIST_PREPARSE : PLAYLIST_GO ) ) : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ), - PLAYLIST_END, - pl ? true : false, false ); + PLAYLIST_END, pl, pl_Unlocked ); RecentsMRL::getInstance( p_intf )->addRecent( toNativeSeparators( file ) ); i++; @@ -481,8 +479,9 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) if (!dir.isEmpty() ) { - QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ? - "dvd://" : "directory://" + toNativeSeparators( dir ); + QString mrl = (dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ? + "dvd://" : "directory://") + + toNativeSeparators( dir ); input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL ); /* FIXME: playlist_AddInput() can fail */ @@ -551,7 +550,7 @@ void DialogsProvider::saveAPlaylist() msg_Warn( p_intf, "Impossible to recognise the file type. " "Defaulting to XSPF" ); psz_module = psz_xspf; - file.append( ".xpsf" ); + file.append( ".xspf" ); } playlist_Export( THEPL, qtu( toNativeSeparators( file ) ), @@ -564,7 +563,7 @@ void DialogsProvider::saveAPlaylist() ****************************************************************************/ void DialogsProvider::streamingDialog( QWidget *parent, - QString mrl, + const QString& mrl, bool b_transcode_only, QStringList options ) { @@ -685,7 +684,7 @@ void DialogsProvider::menuUpdateAction( QObject *data ) func->doFunc( p_intf ); } -void DialogsProvider::SDMenuAction( QString data ) +void DialogsProvider::SDMenuAction( const QString& data ) { char *psz_sd = strdup( qtu( data ) ); if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )