Commit 1cc91766 authored by François Cartegnie's avatar François Cartegnie 🤞

Qt: UpdateDialog: use dynamic event IDs

parent 11279e38
......@@ -141,13 +141,18 @@ static void UpdateCallback( void *data, bool b_ret )
QEvent* event;
if( b_ret )
event = new QEvent( (QEvent::Type)UDOkEvent );
event = new QEvent( UpdateDialog::UDOkEvent );
else
event = new QEvent( (QEvent::Type)UDErrorEvent );
event = new QEvent( UpdateDialog::UDErrorEvent );
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 )
{
/* build Ui */
......
......@@ -65,13 +65,12 @@ public slots:
#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>
{
Q_OBJECT
public:
static const QEvent::Type UDOkEvent;
static const QEvent::Type UDErrorEvent;
void updateNotify( bool );
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