[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
Tue May 26 01:21:01 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 24 01:31:52 2009 +0200| [3b2f1606a0f26ab846e48252baaa57f8dd61ae42] | 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b2f1606a0f26ab846e48252baaa57f8dd61ae42
---
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 37a5037..ee090b0 100644
--- a/modules/gui/qt4/dialogs/external.cpp
+++ b/modules/gui/qt4/dialogs/external.cpp
@@ -59,8 +59,8 @@ int QVLCVariable::callback (vlc_object_t *object, const char *,
}
-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 d2894ef..526a280 100644
--- a/modules/gui/qt4/dialogs/external.hpp
+++ b/modules/gui/qt4/dialogs/external.hpp
@@ -51,7 +51,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 0bde8ff..397ed44 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 d522a8b..292a18c 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