diff options
author | rtk0c <[email protected]> | 2022-07-01 18:12:31 +0000 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-07-01 18:12:31 +0000 |
commit | b992ae0fa4d792002ffae10a9ef893ef4fa42ac4 (patch) | |
tree | b3bfd176df672eefd9a6a627bfeddd03f22cf458 /ui.qt/source/main.cpp | |
parent | fa744c91b0b15d5978e915816e712e388ead7e64 (diff) |
Convert hardcoding files in CMakeLists.txt to file(GLOB)
git-svn-id: file:///home/arch/svn/epistmool/trunk@8 71f44415-077c-4ad7-a976-72ddbf76608f
Diffstat (limited to 'ui.qt/source/main.cpp')
-rw-r--r-- | ui.qt/source/main.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/ui.qt/source/main.cpp b/ui.qt/source/main.cpp deleted file mode 100644 index 863ee20..0000000 --- a/ui.qt/source/main.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include <QApplication> -#include <QLocale> -#include <QQmlApplicationEngine> -#include <QTranslator> - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QTranslator translator; - const QStringList uiLanguages = QLocale::system().uiLanguages(); - for (const QString& locale : uiLanguages) { - const QString baseName = "EpistmoolUI_" + QLocale(locale).name(); - if (translator.load(":/i18n/" + baseName)) { - app.installTranslator(&translator); - break; - } - } - - QQmlApplicationEngine engine; - const QUrl url(u"qrc:/EpistmoolUI/source/qml/MainWindow.qml"_qs); - QObject::connect( - &engine, - &QQmlApplicationEngine::objectCreated, - &app, - [url](QObject* obj, const QUrl& objUrl) { - if (!obj && url == objUrl) { - QCoreApplication::exit(-1); - } - }, - Qt::QueuedConnection); - engine.load(url); - - return app.exec(); -} |