[vlc-devel] commit: [Qt] Split the QtWinApp to its own file and rename it. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Oct 20 13:00:26 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Oct 20 12:59:57 2008 +0200| [22168eab8bdf29606b3c64fd216a86f684866d97] | committer: Jean-Baptiste Kempf 

[Qt] Split the QtWinApp to its own file and rename it.

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

 modules/gui/qt4/Modules.am           |    1 +
 modules/gui/qt4/dialogs_provider.cpp |    1 +
 modules/gui/qt4/main_interface.cpp   |    1 +
 modules/gui/qt4/qt4.cpp              |   15 ++-------------
 modules/gui/qt4/qt4.hpp              |   32 +-------------------------------
 5 files changed, 6 insertions(+), 44 deletions(-)

diff --git a/modules/gui/qt4/Modules.am b/modules/gui/qt4/Modules.am
index 1f43ac2..5f9769a 100644
--- a/modules/gui/qt4/Modules.am
+++ b/modules/gui/qt4/Modules.am
@@ -242,6 +242,7 @@ noinst_HEADERS = \
 	util/input_slider.hpp \
 	util/customwidgets.hpp \
 	util/qvlcframe.hpp \
+	util/qvlcapp.hpp \
 	util/registry.hpp
 
 EXTRA_DIST += \
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 19ebedf..879980a 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -35,6 +35,7 @@
 #include "menus.hpp"
 #include "input_manager.hpp"
 #include "recents.hpp"
+#include "util/qvlcapp.hpp"
 
 /* The dialogs */
 #include "dialogs/playlist.hpp"
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 8782c41..9915cdf 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -31,6 +31,7 @@
 #include "main_interface.hpp"
 #include "input_manager.hpp"
 #include "util/qvlcframe.hpp"
+#include "util/qvlcapp.hpp"
 #include "util/customwidgets.hpp"
 #include "dialogs_provider.hpp"
 #include "components/interface_widgets.hpp"
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 913c745..57de94e 100755
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -21,6 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -40,6 +41,7 @@
 #include "main_interface.hpp"
 #include "dialogs/help.hpp" /* update */
 #include "recents.hpp"
+#include "util/qvlcapp.hpp"
 
 #ifdef HAVE_X11_XLIB_H
 #include <X11/Xlib.h>
@@ -232,19 +234,6 @@ vlc_module_begin();
 #endif
 vlc_module_end();
 
-#if defined(Q_WS_WIN)
-bool WinQtApp::winEventFilter( MSG *msg, long *result )
-{
-    switch( msg->message )
-    {
-        case 0x0319: /* WM_APPCOMMAND 0x0319 */
-        DefWindowProc( msg->hwnd, msg->message, msg->wParam, msg->lParam );
-        break;
-    }
-    return false;
-}
-#endif /* Q_WS_WIN */
-
 /*****************************************************************************
  * Module callbacks
  *****************************************************************************/
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index e7b07f1..38b8f3a 100755
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * qt4.hpp : QT4 interface
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
  *
  * Authors: Clément Stenac <zorglub at videolan.org>
@@ -63,20 +63,6 @@ class DialogsProvider;
 class VideoWidget;
 class QSettings;
 
-
-#include <QApplication>
-#if defined(Q_WS_WIN)
-
-class WinQtApp : public QApplication
-{
-public:
-    WinQtApp ( int & argc, char ** argv, bool GUIenabled ) : QApplication( argc, argv, GUIenabled ) {}
-    ~WinQtApp() {}
-protected:
-    bool winEventFilter(MSG *msg, long *result);
-};
-#endif /* Q_WS_WIN */
-
 struct intf_sys_t
 {
     QApplication *p_app;
@@ -162,20 +148,4 @@ static inline QString removeTrailingSlash( QString s )
 
 #define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
 
-class DialogEvent : public QEvent
-{
-public:
-    DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) :
-                 QEvent( (QEvent::Type)(DialogEvent_Type) )
-    {
-        i_dialog = _i_dialog;
-        i_arg = _i_arg;
-        p_arg = _p_arg;
-    };
-    virtual ~DialogEvent() {};
-
-    int i_arg, i_dialog;
-    intf_dialog_args_t *p_arg;
-};
-
 #endif




More information about the vlc-devel mailing list