[vlc-devel] commit: Use normal QCloseEvent to signal maininterface to closeup ( Ilkka Ollakka )

git version control git at videolan.org
Sat Oct 18 14:46:04 CEST 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Oct 18 15:43:58 2008 +0300| [d2bbd68d5dca8a1b8cfc68712660d83627cc92a7] | committer: Ilkka Ollakka 

Use normal QCloseEvent to signal maininterface to closeup

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2bbd68d5dca8a1b8cfc68712660d83627cc92a7
---

 modules/gui/qt4/main_interface.cpp |    5 -----
 modules/gui/qt4/qt4.cpp            |    2 +-
 modules/gui/qt4/qt4.hpp            |    1 -
 3 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7836abd..3ac08fc 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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 )
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 84a4934..26a9d2e 100755
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -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 );
 }
 
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index fb58ba6..41df230 100755
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -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
 {




More information about the vlc-devel mailing list