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 @@
#include <QFileDialog>
#include <QToolButton>
SoutDialog* SoutDialog::instance = NULL;
SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMRL )
: QVLCDialog( parent, _p_intf )
{
......
......@@ -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;
......
......@@ -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() );
}
......
......@@ -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() ) );
......
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