#include "contentpresenttest.h" #include "mainwindow.h" #include "srcedit_defaulttext.h" #include "srcedit_storyboard.h" #include "xapp.h" #include #include #include #include #include #include int main(int argc, char *argv[]) { XApp a(argc, argv); #ifdef UNIT_TEST MakeTools::ContentPresent *array[] = { new Components::DefaultTextPresent(), new Components::StorychainSourceEdit(), new Components::StoryunitSourceEdit(), new Components::StoryboardSourceEdit(), new Components::StoryvolumeSourceEdit(), new Components::StoryconceptSourceEdit() }; 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("default"); w.show(); #endif return a.exec(); }