[vlmc-devel] commit: Don't use argv/argc directly (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 20 17:21:12 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sat Mar 20 17:21:00 2010 +0100| [cf0ba653c63197034531e345a089b449225dd897] | committer: Hugo Beauzee-Luyssen 

Don't use argv/argc directly

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

 src/Main/main.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Main/main.cpp b/src/Main/main.cpp
index a58e190..f83111a 100644
--- a/src/Main/main.cpp
+++ b/src/Main/main.cpp
@@ -50,7 +50,7 @@ VLMCmain( int argc, char **argv )
     qRegisterMetaType<MainWorkflow::FrameChangedReason>( "MainWorkflow::FrameChangedReason" );
     qRegisterMetaType<QVariant>( "QVariant" );
 
-    if ( argc < 3 )
+    if ( app.arguments().count() < 3 )
     {
         qCritical() << "Usage: ./vlmc project.vlmc output_file";
         return 1;
@@ -59,7 +59,7 @@ VLMCmain( int argc, char **argv )
     ConsoleRenderer renderer;
 
     QCoreApplication::connect( pm, SIGNAL( projectLoaded() ), &renderer, SLOT( startRender() ) );
-    pm->loadProject( argv[1] );
+    pm->loadProject( app.arguments()[1] );
     return app.exec();
 }
 



More information about the Vlmc-devel mailing list