Commit 76313146 authored by Rohit Yadav's avatar Rohit Yadav
Browse files

guimain.cpp: Search for project token and then only load project file.

This matches the docs provided in man page for VLMC.
parent b406f1ef
...@@ -115,8 +115,19 @@ VLMCmain( int argc, char **argv ) ...@@ -115,8 +115,19 @@ VLMCmain( int argc, char **argv )
d.exec(); d.exec();
#endif #endif
MainWindow w; MainWindow w;
if ( argc > 1 )
GUIProjectManager::getInstance()->loadProject( argv[argc - 1] ); /* Check for project file */
for ( int i = 1; i < argc; i++ )
{
QString arg = argv[i];
if ( argc > ( i + 1 ) && ( arg == "--project" || arg == "-p" ) )
{
GUIProjectManager::getInstance()->loadProject( argv[i+1] );
break;
}
}
w.show(); w.show();
return app.exec(); return app.exec();
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment