]> git.sesse.net Git - vlc/commitdiff
Qt: move Sout Dialog out of singleton.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 15 Mar 2009 01:47:21 +0000 (02:47 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 15 Mar 2009 01:47:21 +0000 (02:47 +0100)
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs/sout.hpp
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs_provider.cpp

index d41402bf021fa5d5ba8ba0f6a2cb44078ec89c68..ad41a9b20497e7605d1dc7970be3e719b93cfefd 100644 (file)
@@ -35,8 +35,6 @@
 #include <QFileDialog>
 #include <QToolButton>
 
-SoutDialog* SoutDialog::instance = NULL;
-
 SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMRL )
            : QVLCDialog( parent,  _p_intf )
 {
index 1aade2983e904ddffa910f84ea1464b667f2f3bd..1bee5111d435e059a6cd4a3071f763414f13e8b0 100644 (file)
@@ -113,27 +113,13 @@ class SoutDialog : public QVLCDialog
 {
     Q_OBJECT;
 public:
-    static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf,
-                                    QString mrl = "" )
-    {
-        if( !instance )
-            instance = new SoutDialog( parent, p_intf, mrl );
-        else
-        {
-            /* Recenter the dialog on the parent */
-            instance->setParent( parent, Qt::Dialog );
-        }
-        return instance;
-    }
-
+    SoutDialog( QWidget* parent, intf_thread_t *, QString mrl = "");
     virtual ~SoutDialog(){}
 
     QString getMrl(){ return mrl; }
 
 private:
     Ui::Sout ui;
-    static SoutDialog *instance;
-    SoutDialog( QWidget* parent, intf_thread_t *, QString mrl );
 
     QString mrl;
     QPushButton *okButton;
index 866c5a0c553c5810b6452df31147cd968ffff6c2..12702799faf67d9e87e436ee27dee829122820cb 100644 (file)
@@ -399,7 +399,7 @@ void VLMDialog::selectInput()
 
 void VLMDialog::selectOutput()
 {
-    SoutDialog *s = SoutDialog::getInstance( this, p_intf );
+    SoutDialog *s = new SoutDialog( this, p_intf );
     if( s->exec() == QDialog::Accepted )
         ui.outputLedit->setText( s->getMrl() );
 }
index f4390ded39f59a907af9fb026f3bd8546291ab0c..79ad6aa95f06ac0b65fefc2d62fc818362715e1c 100644 (file)
@@ -576,7 +576,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
     /* Stream */
     if( !b_transcode_only )
     {
-        SoutDialog *s = SoutDialog::getInstance( parent, p_intf, mrl );
+        SoutDialog *s = new SoutDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
         {
             psz_soutoption = strdup( qtu( s->getMrl() ) );