[vlc-devel] commit: Qt: Input Manager, assert the customEvent type acceptance. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Jan 21 20:45:55 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 21 20:44:56 2009 +0100| [1f71a52e82787425cac89d89bc4d30152e1a3a71] | committer: Jean-Baptiste Kempf 

Qt: Input Manager, assert the customEvent type acceptance.

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

 modules/gui/qt4/input_manager.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index ff6bf0f..48262c4 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -31,6 +31,8 @@
 
 #include <QApplication>
 
+#include <assert.h>
+
 static int ItemChanged( vlc_object_t *, const char *,
                         vlc_value_t, vlc_value_t, void * );
 static int PLItemChanged( vlc_object_t *, const char *,
@@ -141,7 +143,7 @@ void InputManager::customEvent( QEvent *event )
     int i_type = event->type();
     IMEvent *ple = static_cast<IMEvent *>(event);
 
-    if ( i_type != PositionUpdate_Type &&
+    assert( !( i_type != PositionUpdate_Type &&
          i_type != ItemChanged_Type &&
          i_type != ItemRateChanged_Type &&
          i_type != ItemTitleChanged_Type &&
@@ -157,8 +159,7 @@ void InputManager::customEvent( QEvent *event )
          i_type != CachingEvent_Type &&
          i_type != BookmarksChanged_Type &&
          i_type != InterfaceAoutUpdate_Type &&
-         i_type != RecordingEvent_Type )
-        return;
+         i_type != RecordingEvent_Type ) );
 
     if( !hasInput() ) return;
 




More information about the vlc-devel mailing list