[vlc-devel] commit: Qt: don' t attach the core dialogs to the Main Interface but to the Dialog Provider. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun May 24 01:39:30 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 24 01:39:01 2009 +0200| [b141d55c6be4a88227eb011d61199e9d0e873ffa] | committer: Jean-Baptiste Kempf
Qt: don't attach the core dialogs to the Main Interface but to the Dialog Provider.
This fix all the dialogs (Fix AVI, HTTP login) that didn't show in skins interface.
Manual port of [3b2f1606a0f26ab846e48252baaa57f8dd61ae42]
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b141d55c6be4a88227eb011d61199e9d0e873ffa
---
modules/gui/qt4/dialogs/external.cpp | 4 ++--
modules/gui/qt4/dialogs/external.hpp | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 3 +++
modules/gui/qt4/main_interface.cpp | 4 ----
modules/gui/qt4/main_interface.hpp | 2 --
5 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/dialogs/external.cpp b/modules/gui/qt4/dialogs/external.cpp
index af2818f..2621076 100644
--- a/modules/gui/qt4/dialogs/external.cpp
+++ b/modules/gui/qt4/dialogs/external.cpp
@@ -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),
diff --git a/modules/gui/qt4/dialogs/external.hpp b/modules/gui/qt4/dialogs/external.hpp
index dda635b..1e5ed5e 100644
--- a/modules/gui/qt4/dialogs/external.hpp
+++ b/modules/gui/qt4/dialogs/external.hpp
@@ -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:
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index bcd3bad..bda9130 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -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()
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 33cbba1..4b0be03 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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();
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 1d39a81..4ea7ba3 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -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();
More information about the vlc-devel
mailing list