src/main.cpp

changeset 1
c9b22c06307c
parent 0
bb264814dd81
child 2
1d544788a8b3
--- a/src/main.cpp	Tue Jul 16 23:53:31 2013 +0300
+++ b/src/main.cpp	Wed Jul 17 00:30:03 2013 +0300
@@ -1,13 +1,31 @@
+#include <QApplication>
 #include "types.h"
+#include "config.h"
 
-int main() {
+// =============================================================================
+// -----------------------------------------------------------------------------
+int main( int argc, char* argv[] ) {
+	QApplication app( argc, argv );
+	
+	for( int i = 1; i < argc; ++i ) {
+		str arg = argv[i];
+		
+		if( arg == "--config" ) {
+			ConfigBox* dlg = new ConfigBox;
+			dlg->show();
+		}
+	}
+	
 	print ("Hello world! This is " APPNAME " %1\n", versionString() );
+	return app.exec();
 }
 
+// =============================================================================
+// -----------------------------------------------------------------------------
 QString versionString() {
 	str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR );
 #if VERSION_PATCH != 0
-	text += fmt( ".%3", VERSION_PATCH );
+	text += fmt( ".%1", VERSION_PATCH );
 #endif
 	
 #if BUILD_ID == BUILD_INTERNAL

mercurial