[vlmc-devel] commit: Fixing metatype declaration. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Tue Aug 24 21:33:09 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Aug 24 21:31:56 2010 +0200| [cce685dd4ec9a90d9430826ae33c5d7ff2fd4371] | committer: Hugo Beauzée-Luyssen 

Fixing metatype declaration.

One type had been moved, and this was breaking server mode, as the
mainwindow isn't created in this mode.

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

 src/Gui/MainWindow.cpp |    4 ----
 src/Main/vlmc.cpp      |    9 ++++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 075f2a7..4488852 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -72,10 +72,6 @@ MainWindow::MainWindow( QWidget *parent ) :
 {
     m_ui.setupUi( this );
 
-    qRegisterMetaType<Workflow::TrackType>( "Workflow::TrackType" );
-    qRegisterMetaType<Vlmc::FrameChangedReason>( "MainWorkflow::FrameChangedReason" );
-    qRegisterMetaType<QVariant>( "QVariant" );
-
     //We only install message handler here cause it uses configuration.
 //    VlmcDebug::getInstance()->setup();
 
diff --git a/src/Main/vlmc.cpp b/src/Main/vlmc.cpp
index 8ec0e05..848142b 100644
--- a/src/Main/vlmc.cpp
+++ b/src/Main/vlmc.cpp
@@ -22,11 +22,15 @@
 
 #include "config.h"
 
-#include <QtDebug>
+#include "Types.h"
+
+#include <QMetaType>
+#include <QVariant>
 
 #include <sys/wait.h>
 #include <unistd.h>
 
+
 int VLMCmain( int , char** );
 
 #if defined(WITH_CRASHHANDLER) && defined(Q_OS_UNIX)
@@ -96,6 +100,9 @@ int     main( int argc, char **argv )
         }
     }
 #else
+    qRegisterMetaType<Workflow::TrackType>( "Workflow::TrackType" );
+    qRegisterMetaType<Vlmc::FrameChangedReason>( "Vlmc::FrameChangedReason" );
+    qRegisterMetaType<QVariant>( "QVariant" );
     return VLMCmain( argc, argv );
 #endif
 }



More information about the Vlmc-devel mailing list