]> git.sesse.net Git - vlc/commitdiff
Use normal QCloseEvent to signal maininterface to closeup
authorIlkka Ollakka <ileoo@videolan.org>
Sat, 18 Oct 2008 12:43:58 +0000 (15:43 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sat, 18 Oct 2008 12:45:57 +0000 (15:45 +0300)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp

index 7836abd692411b8200cff830cd5933fd58f57e05..3ac08fcabbe6e8ae131d989f1690473e099ca577 100644 (file)
@@ -1088,11 +1088,6 @@ void MainInterface::customEvent( QEvent *event )
             setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
         show(); /* necessary to apply window flags?? */
     }
-    if ( event->type() == MainInterfaceClose_Type )
-    {
-        QApplication::closeAllWindows();
-        QApplication::quit();
-    }
 }
 
 void MainInterface::keyPressEvent( QKeyEvent *e )
index 84a493486276696dd2b767488118bd3b00ea127e..26a9d2ec360d83803160e7c3badc4d1453c13e98 100755 (executable)
@@ -325,7 +325,7 @@ static QWaitCondition windowWait;
 static void ThreadCleanup( void *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 );
 }
 
index fb58ba64a7a438cdf4597a4dfaa4e15cf1429c32..41df230136d932aaf8d777db5e26e353bf27ddc7 100755 (executable)
@@ -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 PLDockEvent_Type = QEvent::User + DialogEventType + 3;
 static const int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4;
-static const int MainInterfaceClose_Type  = QEvent::User + 404;
 
 class DialogEvent : public QEvent
 {