[vlc-commits] qt: open dialog: Remove always false parameter

Hugo Beauzée-Luyssen git at videolan.org
Fri Apr 13 16:10:38 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 13 13:36:36 2018 +0200| [fdd95c9042efc97515016be929fa6d350c62d40e] | committer: Hugo Beauzée-Luyssen

qt: open dialog: Remove always false parameter

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

 modules/gui/qt/components/playlist/standardpanel.cpp |  2 +-
 modules/gui/qt/dialogs/open.cpp                      | 10 +++-------
 modules/gui/qt/dialogs/open.hpp                      |  2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt/components/playlist/standardpanel.cpp b/modules/gui/qt/components/playlist/standardpanel.cpp
index 3d6fe6e6a8..d3d658c1f4 100644
--- a/modules/gui/qt/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt/components/playlist/standardpanel.cpp
@@ -386,7 +386,7 @@ void StandardPLPanel::popupAction( QAction *action )
         dialog = OpenDialog::getInstance( this, p_intf, false, SELECT, true, true );
         dialog->showTab( OPEN_FILE_TAB );
         dialog->exec(); /* make it modal */
-        a.uris = dialog->getMRLs( false );
+        a.uris = dialog->getMRLs();
         a.options = dialog->getOptions();
         if ( a.uris.isEmpty() ) return;
         action->setData( QVariant::fromValue( a ) );
diff --git a/modules/gui/qt/dialogs/open.cpp b/modules/gui/qt/dialogs/open.cpp
index 817556ace9..6bde576599 100644
--- a/modules/gui/qt/dialogs/open.cpp
+++ b/modules/gui/qt/dialogs/open.cpp
@@ -234,13 +234,9 @@ QString OpenDialog::getMRL( bool b_all )
                  : itemsMRL[0];
 }
 
-QStringList OpenDialog::getMRLs( bool b_with_options )
+QStringList OpenDialog::getMRLs()
 {
-    if ( !b_with_options ) return itemsMRL;
-    QStringList postfixedMRLs;
-    foreach( const QString &mrl, itemsMRL )
-        postfixedMRLs << QString( mrl ).append( getOptions() );
-    return postfixedMRLs;
+    return itemsMRL;
 }
 
 QString OpenDialog::getOptions()
@@ -403,7 +399,7 @@ void OpenDialog::stream( bool b_transcode_only )
     for( int i = 0; i < OPEN_TAB_MAX; i++ )
         qobject_cast<OpenPanel*>( ui.Tab->widget( i ) )->onAccept();
 
-    QStringList soutMRLS = getMRLs(false);
+    QStringList soutMRLS = getMRLs();
     if(soutMRLS.empty())
     {
         return;
diff --git a/modules/gui/qt/dialogs/open.hpp b/modules/gui/qt/dialogs/open.hpp
index 0ce6f815a4..325e010a78 100644
--- a/modules/gui/qt/dialogs/open.hpp
+++ b/modules/gui/qt/dialogs/open.hpp
@@ -71,7 +71,7 @@ public:
     void showTab( int = OPEN_FILE_TAB );
     QString getMRL( bool b = true );
 
-    QStringList getMRLs( bool b = true );
+    QStringList getMRLs();
     QString getOptions();
 
 public slots:



More information about the vlc-commits mailing list