Commit 11279e38 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: use dynamic ID for DialogEvent

parent 6f435e88
...@@ -117,7 +117,7 @@ void DialogsProvider::quit() ...@@ -117,7 +117,7 @@ void DialogsProvider::quit()
void DialogsProvider::customEvent( QEvent *event ) void DialogsProvider::customEvent( QEvent *event )
{ {
if( event->type() == (int)DialogEvent_Type ) if( event->type() == DialogEvent::DialogEvent_Type )
{ {
DialogEvent *de = static_cast<DialogEvent*>(event); DialogEvent *de = static_cast<DialogEvent*>(event);
switch( de->i_dialog ) switch( de->i_dialog )
...@@ -178,6 +178,9 @@ void DialogsProvider::customEvent( QEvent *event ) ...@@ -178,6 +178,9 @@ void DialogsProvider::customEvent( QEvent *event )
/**************************************************************************** /****************************************************************************
* Individual simple dialogs * Individual simple dialogs
****************************************************************************/ ****************************************************************************/
const QEvent::Type DialogEvent::DialogEvent_Type =
(QEvent::Type)QEvent::registerEventType();
void DialogsProvider::playlistDialog() void DialogsProvider::playlistDialog()
{ {
PlaylistDialog::getInstance( p_intf )->toggleVisible(); PlaylistDialog::getInstance( p_intf )->toggleVisible();
......
...@@ -57,13 +57,6 @@ enum { ...@@ -57,13 +57,6 @@ enum {
EXT_FILTER_SUBTITLE = 0x10, EXT_FILTER_SUBTITLE = 0x10,
}; };
enum {
DialogEvent_Type = QEvent::User + DialogEventTypeOffset + 1,
//PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
//PLDockEvent_Type = QEvent::User + DialogEventType + 3;
SetVideoOnTopEvent_Type = QEvent::User + DialogEventTypeOffset + 4,
};
class QEvent; class QEvent;
class QSignalMapper; class QSignalMapper;
class VLCMenuBar; class VLCMenuBar;
...@@ -186,8 +179,9 @@ signals: ...@@ -186,8 +179,9 @@ signals:
class DialogEvent : public QEvent class DialogEvent : public QEvent
{ {
public: public:
static const QEvent::Type DialogEvent_Type;
DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) : DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) :
QEvent( (QEvent::Type)(DialogEvent_Type) ) QEvent( DialogEvent_Type )
{ {
i_dialog = _i_dialog; i_dialog = _i_dialog;
i_arg = _i_arg; i_arg = _i_arg;
......
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