--- a/src/main.cpp Sat Jun 06 22:28:34 2015 +0300 +++ b/src/main.cpp Sat Jun 06 23:02:51 2015 +0300 @@ -17,11 +17,9 @@ */ #include <QApplication> -#include "configwindow.h" -#include "types.h" #include "demo.h" #include "prompts.h" -#include "hginfo.h" +#include "misc.h" // // ------------------------------------------------------------------------------------------------- @@ -33,19 +31,7 @@ app.setApplicationName (UNIXNAME); app.setOrganizationName (UNIXNAME); app.setApplicationVersion (versionString()); - qRegisterMetaType<ZandronumVersion> ("ZandronumVersion"); - qRegisterMetaTypeStreamOperators<ZandronumVersion> ("ZandronumVersion"); - - for (int i = 1; i < argc; ++i) - { - QString arg = argv[i]; - - if (arg == "--config") - { - ConfigWindow dlg; - return dlg.exec(); - } - } + commonInit(); if (argc > 1) { @@ -60,39 +46,4 @@ return launchDemo (dlg->path()); } -} - -// -// ------------------------------------------------------------------------------------------------- -// - -QString versionString() -{ -#ifndef RELEASE -# ifdef HG_NODE - // non-release with hg info - return VERSION_STRING "-" HG_NODE; -# else - // non-release, no hg info - return VERSION_STRING "-beta"; -# endif -#else - // release - return VERSION_STRING; -#endif -} - -// -// ------------------------------------------------------------------------------------------------- -// - -QString versionSignature() -{ -#ifdef HG_DATE_STRING -# define DATE_INFO " (" HG_DATE_STRING ")" -#else -# define DATE_INFO "" -#endif - - return QString (APPNAME) + " " + versionString() + DATE_INFO; } \ No newline at end of file