Commit 1cc91766 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: UpdateDialog: use dynamic event IDs

parent 11279e38
...@@ -141,13 +141,18 @@ static void UpdateCallback( void *data, bool b_ret ) ...@@ -141,13 +141,18 @@ static void UpdateCallback( void *data, bool b_ret )
QEvent* event; QEvent* event;
if( b_ret ) if( b_ret )
event = new QEvent( (QEvent::Type)UDOkEvent ); event = new QEvent( UpdateDialog::UDOkEvent );
else else
event = new QEvent( (QEvent::Type)UDErrorEvent ); event = new QEvent( UpdateDialog::UDErrorEvent );
QApplication::postEvent( UDialog, event ); QApplication::postEvent( UDialog, event );
} }
const QEvent::Type UpdateDialog::UDOkEvent =
(QEvent::Type)QEvent::registerEventType();
const QEvent::Type UpdateDialog::UDErrorEvent =
(QEvent::Type)QEvent::registerEventType();
UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{ {
/* build Ui */ /* build Ui */
......
...@@ -65,13 +65,12 @@ public slots: ...@@ -65,13 +65,12 @@ public slots:
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
static const int UDOkEvent = QEvent::User + DialogEventTypeOffset + 21;
static const int UDErrorEvent = QEvent::User + DialogEventTypeOffset + 22;
class UpdateDialog : public QVLCFrame, public Singleton<UpdateDialog> class UpdateDialog : public QVLCFrame, public Singleton<UpdateDialog>
{ {
Q_OBJECT Q_OBJECT
public: public:
static const QEvent::Type UDOkEvent;
static const QEvent::Type UDErrorEvent;
void updateNotify( bool ); void updateNotify( bool );
private: private:
......
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