From b992ae0fa4d792002ffae10a9ef893ef4fa42ac4 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 1 Jul 2022 18:12:31 +0000 Subject: Convert hardcoding files in CMakeLists.txt to file(GLOB) git-svn-id: file:///home/arch/svn/epistmool/trunk@8 71f44415-077c-4ad7-a976-72ddbf76608f --- ui.qt/source/main.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 ui.qt/source/main.cpp (limited to 'ui.qt/source/main.cpp') 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 -#include -#include -#include - -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(); -} -- cgit v1.2.3-70-g09d2