[vlc-devel] commit: Qt: OpenUrlDialog ain't a Singleton anymore (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Feb 4 03:47:30 CET 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  4 03:46:49 2010 +0100| [49f0cd875aa0b48c8e64789f885b1e9041cc9ec7] | committer: Jean-Baptiste Kempf 

Qt: OpenUrlDialog ain't a Singleton anymore

And remove unnecessary killInstances

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

 modules/gui/qt4/dialogs/openurl.hpp  |    5 ++---
 modules/gui/qt4/dialogs_provider.cpp |    7 ++-----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/dialogs/openurl.hpp b/modules/gui/qt4/dialogs/openurl.hpp
index c7fae15..3fb0929 100644
--- a/modules/gui/qt4/dialogs/openurl.hpp
+++ b/modules/gui/qt4/dialogs/openurl.hpp
@@ -34,12 +34,11 @@
 
 class ClickLineEdit;
 
-class OpenUrlDialog : public QVLCDialog, public Singleton<OpenUrlDialog>
+class OpenUrlDialog : public QVLCDialog
 {
     Q_OBJECT
 
 private:
-    OpenUrlDialog( intf_thread_t *, bool bClipboard = true );
     QString lastUrl;
     bool bClipboard, bShouldEnqueue;
     ClickLineEdit *edit;
@@ -49,6 +48,7 @@ private slots:
     void play();
 
 public:
+    OpenUrlDialog( intf_thread_t *, bool bClipboard = true );
     virtual ~OpenUrlDialog() {}
 
     QString url() const;
@@ -58,7 +58,6 @@ public:
 public slots:
     virtual void close() { play(); };
 
-    friend class    Singleton<OpenUrlDialog>;
 };
 
 #endif
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 5570974..0eced2b 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -91,14 +91,10 @@ DialogsProvider::~DialogsProvider()
     ExtendedDialog::killInstance();
     BookmarksDialog::killInstance();
     HelpDialog::killInstance();
-    AboutDialog::killInstance();
 #ifdef UPDATE_CHECK
     UpdateDialog::killInstance();
 #endif
     PluginDialog::killInstance();
-    VLMDialog::killInstance();
-    OpenUrlDialog::killInstance();
-    GotoTimeDialog::killInstance();
     PodcastConfigDialog::killInstance();
     EpgDialog::killInstance();
     ErrorsDialog::killInstance();
@@ -470,7 +466,7 @@ void DialogsProvider::simpleMLAppendDialog()
  **/
 void DialogsProvider::openUrlDialog()
 {
-    OpenUrlDialog *oud = OpenUrlDialog::getInstance( p_intf );
+    OpenUrlDialog *oud = new OpenUrlDialog( p_intf );
     if( oud->exec() == QDialog::Accepted )
     {
         QString url = oud->url();
@@ -484,6 +480,7 @@ void DialogsProvider::openUrlDialog()
             RecentsMRL::getInstance( p_intf )->addRecent( url );
         }
     }
+    delete oud;
 }
 
 /* Directory */




More information about the vlc-devel mailing list