]> git.sesse.net Git - vlc/commitdiff
Qt: don't attach the core dialogs to the Main Interface but to the Dialog Provider.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 23 May 2009 23:39:01 +0000 (01:39 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 23 May 2009 23:39:01 +0000 (01:39 +0200)
This fix all the dialogs (Fix AVI, HTTP login) that didn't show in skins interface.
Manual port of [3b2f1606a0f26ab846e48252baaa57f8dd61ae42]

modules/gui/qt4/dialogs/external.cpp
modules/gui/qt4/dialogs/external.hpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index af2818f4a5d7085be2ace30fad28b6e34fc585dc..2621076f8c4c9d72c35167f0373d35b6b8d2295f 100644 (file)
@@ -36,8 +36,8 @@
 #include <QProgressDialog>
 #include <QMutex>
 
-DialogHandler::DialogHandler (intf_thread_t *intf)
-    : intf (intf),
+DialogHandler::DialogHandler (intf_thread_t *intf, QObject *_parent)
+    : intf (intf), QObject( _parent ),
       message (VLC_OBJECT(intf), "dialog-fatal", VLC_VAR_ADDRESS),
       login (VLC_OBJECT(intf), "dialog-login", VLC_VAR_ADDRESS),
       question (VLC_OBJECT(intf), "dialog-question", VLC_VAR_ADDRESS),
index dda635bc0a2413234f32ae6f28d8f93e51a46ee1..1e5ed5edabf955950a8d69e7a3211482409b8eb7 100644 (file)
@@ -35,7 +35,7 @@ class DialogHandler : public QObject
     friend class QVLCProgressDialog;
 
 public:
-    DialogHandler (intf_thread_t *);
+    DialogHandler (intf_thread_t *, QObject *parent);
     ~DialogHandler (void);
 
 private:
index bcd3bad24d63d73219149c3c0f68f60dc7b3b76f..bda9130cc4232aca649b65255f563faac0512f80 100644 (file)
@@ -52,6 +52,7 @@
 #include "dialogs/podcast_configuration.hpp"
 #include "dialogs/toolbar.hpp"
 #include "dialogs/plugins.hpp"
+#include "dialogs/external.hpp"
 
 #include <QEvent>
 #include <QApplication>
@@ -76,6 +77,8 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
 
     SDMapper = new QSignalMapper();
     CONNECT( SDMapper, mapped (QString), this, SDMenuAction( QString ) );
+
+    DialogHandler *dialogHandler = new DialogHandler (p_intf, this );
 }
 
 DialogsProvider::~DialogsProvider()
index 33cbba1f663abfbf0199a21388206aa9b488d7da..4b0be03becc13e26c8c53a052c8715bb635a32cf 100644 (file)
@@ -206,8 +206,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
 
     /* END CONNECTS ON IM */
 
-    dialogHandler = new DialogHandler (p_intf);
-
     /************
      * Callbacks
      ************/
@@ -284,8 +282,6 @@ MainInterface::~MainInterface()
 {
     msg_Dbg( p_intf, "Destroying the main interface" );
 
-    delete dialogHandler;
-
     /* Unsure we hide the videoWidget before destroying it */
     if( videoIsActive ) videoWidget->hide();
 
index 1d39a81685cf09830bf050aea9d09187742a3312..4ea7ba3092fd2547c44017566f03e7e784bdfa70 100644 (file)
@@ -49,7 +49,6 @@ class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
-class DialogHandler;
 
 enum {
     CONTROLS_VISIBLE = 0x1,
@@ -110,7 +109,6 @@ private:
     ControlsWidget      *controls;
     InputControlsWidget *inputC;
     FullscreenControllerWidget *fullscreenControls;
-    DialogHandler       *dialogHandler;
 
     void createMainWidget( QSettings* );
     void createStatusBar();