Commit 6e6dd550 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: move Sout Dialog out of singleton.

parent db8ce6ef
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include <QFileDialog> #include <QFileDialog>
#include <QToolButton> #include <QToolButton>
SoutDialog* SoutDialog::instance = NULL;
SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMRL ) SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMRL )
: QVLCDialog( parent, _p_intf ) : QVLCDialog( parent, _p_intf )
{ {
......
...@@ -113,27 +113,13 @@ class SoutDialog : public QVLCDialog ...@@ -113,27 +113,13 @@ class SoutDialog : public QVLCDialog
{ {
Q_OBJECT; Q_OBJECT;
public: public:
static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf, SoutDialog( QWidget* parent, intf_thread_t *, QString mrl = "");
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;
}
virtual ~SoutDialog(){} virtual ~SoutDialog(){}
QString getMrl(){ return mrl; } QString getMrl(){ return mrl; }
private: private:
Ui::Sout ui; Ui::Sout ui;
static SoutDialog *instance;
SoutDialog( QWidget* parent, intf_thread_t *, QString mrl );
QString mrl; QString mrl;
QPushButton *okButton; QPushButton *okButton;
......
...@@ -399,7 +399,7 @@ void VLMDialog::selectInput() ...@@ -399,7 +399,7 @@ void VLMDialog::selectInput()
void VLMDialog::selectOutput() void VLMDialog::selectOutput()
{ {
SoutDialog *s = SoutDialog::getInstance( this, p_intf ); SoutDialog *s = new SoutDialog( this, p_intf );
if( s->exec() == QDialog::Accepted ) if( s->exec() == QDialog::Accepted )
ui.outputLedit->setText( s->getMrl() ); ui.outputLedit->setText( s->getMrl() );
} }
......
...@@ -576,7 +576,7 @@ void DialogsProvider::streamingDialog( QWidget *parent, ...@@ -576,7 +576,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
/* Stream */ /* Stream */
if( !b_transcode_only ) 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 ) if( s->exec() == QDialog::Accepted )
{ {
psz_soutoption = strdup( qtu( s->getMrl() ) ); psz_soutoption = strdup( qtu( s->getMrl() ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment