]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/util/qvlcapp.hpp
Qt/ML: Pictureflow should work with VLCModel
[vlc] / modules / gui / qt4 / util / qvlcapp.hpp
index 3144ad9e89c9a8fe7b2166ded41dcfdf4373d08c..66fa024898d9eff6c0b53ab71fa86f539fbd301b 100644 (file)
@@ -40,47 +40,28 @@ class QVLCApp : public QApplication
 {
     Q_OBJECT
 
-public:
-    QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true )
+private slots:
+    void doQuit()
     {
-        connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
+        closeAllWindows();
+        quit();
     }
 
-    static void triggerQuit()
+public:
+    QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true )
     {
-         QVLCApp *app = qobject_cast<QVLCApp*>( instance() );
-         if ( app )
-             emit app->quitSignal();
+        connect( this, SIGNAL(quitSignal()), this, SLOT(doQuit()) );
     }
 
-#if defined (Q_WS_X11)
-     QVLCApp( Display *dp, int & argc, char ** argv )
-         : QApplication( dp, argc, argv )
-     {
-        connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
-     }
-#endif
-
-#if defined(Q_WS_WIN)
-#define THBN_CLICKED        0x1800
-protected:
-    virtual bool winEventFilter( MSG *msg, long *result )
+    static void triggerQuit()
     {
-        switch( msg->message )
-        {
-            case 0x0319: /* WM_APPCOMMAND 0x0319 */
-                DefWindowProc( msg->hwnd, msg->message,
-                               msg->wParam, msg->lParam );
-                break;
-        }
-        return false;
+        QVLCApp *app = qobject_cast<QVLCApp*>( instance() );
+        if( app )
+            emit app->quitSignal();
     }
-#endif
-
 
 signals:
     void quitSignal();
 
 };
-
 #endif