Commit 49f0cd87 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: OpenUrlDialog ain't a Singleton anymore

And remove unnecessary killInstances
parent af29c151
...@@ -34,12 +34,11 @@ ...@@ -34,12 +34,11 @@
class ClickLineEdit; class ClickLineEdit;
class OpenUrlDialog : public QVLCDialog, public Singleton<OpenUrlDialog> class OpenUrlDialog : public QVLCDialog
{ {
Q_OBJECT Q_OBJECT
private: private:
OpenUrlDialog( intf_thread_t *, bool bClipboard = true );
QString lastUrl; QString lastUrl;
bool bClipboard, bShouldEnqueue; bool bClipboard, bShouldEnqueue;
ClickLineEdit *edit; ClickLineEdit *edit;
...@@ -49,6 +48,7 @@ private slots: ...@@ -49,6 +48,7 @@ private slots:
void play(); void play();
public: public:
OpenUrlDialog( intf_thread_t *, bool bClipboard = true );
virtual ~OpenUrlDialog() {} virtual ~OpenUrlDialog() {}
QString url() const; QString url() const;
...@@ -58,7 +58,6 @@ public: ...@@ -58,7 +58,6 @@ public:
public slots: public slots:
virtual void close() { play(); }; virtual void close() { play(); };
friend class Singleton<OpenUrlDialog>;
}; };
#endif #endif
...@@ -91,14 +91,10 @@ DialogsProvider::~DialogsProvider() ...@@ -91,14 +91,10 @@ DialogsProvider::~DialogsProvider()
ExtendedDialog::killInstance(); ExtendedDialog::killInstance();
BookmarksDialog::killInstance(); BookmarksDialog::killInstance();
HelpDialog::killInstance(); HelpDialog::killInstance();
AboutDialog::killInstance();
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
UpdateDialog::killInstance(); UpdateDialog::killInstance();
#endif #endif
PluginDialog::killInstance(); PluginDialog::killInstance();
VLMDialog::killInstance();
OpenUrlDialog::killInstance();
GotoTimeDialog::killInstance();
PodcastConfigDialog::killInstance(); PodcastConfigDialog::killInstance();
EpgDialog::killInstance(); EpgDialog::killInstance();
ErrorsDialog::killInstance(); ErrorsDialog::killInstance();
...@@ -470,7 +466,7 @@ void DialogsProvider::simpleMLAppendDialog() ...@@ -470,7 +466,7 @@ void DialogsProvider::simpleMLAppendDialog()
**/ **/
void DialogsProvider::openUrlDialog() void DialogsProvider::openUrlDialog()
{ {
OpenUrlDialog *oud = OpenUrlDialog::getInstance( p_intf ); OpenUrlDialog *oud = new OpenUrlDialog( p_intf );
if( oud->exec() == QDialog::Accepted ) if( oud->exec() == QDialog::Accepted )
{ {
QString url = oud->url(); QString url = oud->url();
...@@ -484,6 +480,7 @@ void DialogsProvider::openUrlDialog() ...@@ -484,6 +480,7 @@ void DialogsProvider::openUrlDialog()
RecentsMRL::getInstance( p_intf )->addRecent( url ); RecentsMRL::getInstance( p_intf )->addRecent( url );
} }
} }
delete oud;
} }
/* Directory */ /* Directory */
......
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