Commit d2bbd68d authored by Ilkka Ollakka's avatar Ilkka Ollakka

Use normal QCloseEvent to signal maininterface to closeup

parent 8ce3a352
...@@ -1088,11 +1088,6 @@ void MainInterface::customEvent( QEvent *event ) ...@@ -1088,11 +1088,6 @@ void MainInterface::customEvent( QEvent *event )
setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint); setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
show(); /* necessary to apply window flags?? */ show(); /* necessary to apply window flags?? */
} }
if ( event->type() == MainInterfaceClose_Type )
{
QApplication::closeAllWindows();
QApplication::quit();
}
} }
void MainInterface::keyPressEvent( QKeyEvent *e ) void MainInterface::keyPressEvent( QKeyEvent *e )
......
...@@ -325,7 +325,7 @@ static QWaitCondition windowWait; ...@@ -325,7 +325,7 @@ static QWaitCondition windowWait;
static void ThreadCleanup( void *param) static void ThreadCleanup( void *param)
{ {
intf_thread_t *p_intf = (intf_thread_t *)param; intf_thread_t *p_intf = (intf_thread_t *)param;
QEvent *event = new QEvent((QEvent::Type)(MainInterfaceClose_Type) ); QCloseEvent *event = new QCloseEvent();
QApplication::postEvent( p_intf->p_sys->p_mi, event ); QApplication::postEvent( p_intf->p_sys->p_mi, event );
} }
......
...@@ -158,7 +158,6 @@ static const int DialogEvent_Type = QEvent::User + DialogEventType + 1; ...@@ -158,7 +158,6 @@ static const int DialogEvent_Type = QEvent::User + DialogEventType + 1;
//static const int PLUndockEvent_Type = QEvent::User + DialogEventType + 2; //static const int PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
//static const int PLDockEvent_Type = QEvent::User + DialogEventType + 3; //static const int PLDockEvent_Type = QEvent::User + DialogEventType + 3;
static const int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4; static const int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4;
static const int MainInterfaceClose_Type = QEvent::User + 404;
class DialogEvent : public QEvent class DialogEvent : public QEvent
{ {
......
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