#include "mainwindow.h" #include "xapplication.h" #include "contentpresenttest.h" #include "default_textpresent.h" #include "storychain_sourceeditor.h" #include #include #include #include #include #include int main(int argc, char *argv[]) { XApplication a(argc, argv); #ifdef UNIT_TEST MakeTools::ContentPresent *array[] = { new Components::DefaultTextPresent(), new Components::StorychainSourceEdit() }; for(auto &it : array){ TestCase::ContentPresentTest tx0(it); QTest::qExec(&tx0, argc, argv); } #else QTranslator translator; const QStringList uiLanguages = QLocale::system().uiLanguages(); for (const QString &locale : uiLanguages) { const QString baseName = "WordsIDE_" + QLocale(locale).name(); if (translator.load(":/i18n/" + baseName)) { a.installTranslator(&translator); break; } } MainWindow w; w.show(); #endif return a.exec(); }