]> git.sesse.net Git - vlc/commitdiff
qt4: remove tautology, constify singleFileSelected
authorTristan Matthews <tmatth@videolan.org>
Tue, 2 Dec 2014 17:36:58 +0000 (12:36 -0500)
committerTristan Matthews <tmatth@videolan.org>
Tue, 2 Dec 2014 17:43:57 +0000 (12:43 -0500)
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/convert.hpp

index 5a7bceea962540fc367bdca333114568b6190199..b0f3a84859d2a23215cca0f9d580cd2ddd1ee87d 100644 (file)
@@ -39,7 +39,8 @@
 
 ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
                               const QStringList& inputMRLs )
-              : QVLCDialog( parent, _p_intf )
+              : QVLCDialog( parent, _p_intf ),
+                singleFileSelected( inputMRLs.length() == 1 )
 {
     setWindowTitle( qtr( "Convert" ) );
     setWindowRole( "vlc-convert" );
@@ -48,8 +49,6 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
     SoutInputBox *inputBox = new SoutInputBox( this );
     incomingMRLs = &inputMRLs;
 
-    singleFileSelected = (inputMRLs.length() == 1);
-
     if(singleFileSelected)
     {
         inputBox->setMRL( inputMRLs[0] );
@@ -220,7 +219,7 @@ void ConvertDialog::close()
                 }
 
                 // If we have multiple files (i.e. we have an appenBox) and it's checked
-                if(!singleFileSelected && appendBox->isChecked())
+                if( appendBox->isChecked() )
                 {
                     newFileName = newFileName.append("-converted");
                 }
index 8b69c0b0bda691db978a0af99d61a1663ce20d67..56ad4696217b905bf5ef44bdc02976407c20c29b 100644 (file)
@@ -50,7 +50,7 @@ private:
     VLCProfileSelector *profile;
 
     const QStringList *incomingMRLs;
-    bool singleFileSelected;
+    const bool singleFileSelected;
     QStringList mrls;
 
 private slots: