[vlc-commits] qt4: remove tautology, constify singleFileSelected

Tristan Matthews git at videolan.org
Tue Dec 2 18:44:52 CET 2014


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue Dec  2 12:36:58 2014 -0500| [575a20f3c2f5ae886a63b27a7e2c9bce7e997075] | committer: Tristan Matthews

qt4: remove tautology, constify singleFileSelected

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=575a20f3c2f5ae886a63b27a7e2c9bce7e997075
---

 modules/gui/qt4/dialogs/convert.cpp |    7 +++----
 modules/gui/qt4/dialogs/convert.hpp |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/dialogs/convert.cpp b/modules/gui/qt4/dialogs/convert.cpp
index 5a7bcee..b0f3a84 100644
--- a/modules/gui/qt4/dialogs/convert.cpp
+++ b/modules/gui/qt4/dialogs/convert.cpp
@@ -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");
                 }
diff --git a/modules/gui/qt4/dialogs/convert.hpp b/modules/gui/qt4/dialogs/convert.hpp
index 8b69c0b..56ad469 100644
--- a/modules/gui/qt4/dialogs/convert.hpp
+++ b/modules/gui/qt4/dialogs/convert.hpp
@@ -50,7 +50,7 @@ private:
     VLCProfileSelector *profile;
 
     const QStringList *incomingMRLs;
-    bool singleFileSelected;
+    const bool singleFileSelected;
     QStringList mrls;
 
 private slots:



More information about the vlc-commits mailing list