- // We catch SIGTERM and SIGINT (caused by Ctrl+C) to graceful shutdown Quassel.
- signal(SIGTERM, handle_signal);
- signal(SIGINT, handle_signal);
-
- // Logger logger;
-
- Global::registerMetaTypes();
- Global::setupVersion();
-
-#if defined BUILD_CORE
- Global::runMode = Global::CoreOnly;
- QCoreApplication app(argc, argv);
-#elif defined BUILD_QTUI
- Global::runMode = Global::ClientOnly;
- QApplication app(argc, argv);
-#else
- Global::runMode = Global::Monolithic;
- QApplication app(argc, argv);
-#endif
-
- qsrand(QDateTime::currentDateTime().toTime_t());
-
- // Set up i18n support
- QLocale locale = QLocale::system();
-
- QTranslator qtTranslator;
- qtTranslator.load(QString(":i18n/qt_%1").arg(locale.name()));
- app.installTranslator(&qtTranslator);
-
- QTranslator quasselTranslator;
- quasselTranslator.load(QString(":i18n/quassel_%1").arg(locale.name()));
- app.installTranslator(&quasselTranslator);