]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.cpp
Qt: Use a QFontComboBox instead of a QFontDialog.
[vlc] / modules / gui / qt4 / dialogs_provider.cpp
index c2f7f836f958e51df93656cf3e11ced270764b68..f150b0eceb431c1f1bba302018d3a25c4d984405 100644 (file)
@@ -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 ) )