/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2024 Alexander Kavon */ #include #include #include #include #include #include #include #include #include #include "version-kue.h" #include #include #include #include "kueconfig.h" using namespace Qt::Literals::StringLiterals; int main(int argc, char *argv[]) { QApplication app(argc, argv); // Default to org.kde.desktop style unless the user forces another style if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) { QQuickStyle::setStyle(u"org.kde.desktop"_s); } KLocalizedString::setApplicationDomain("kue"); QCoreApplication::setOrganizationName(u"KDE"_s); KAboutData aboutData( // The program name used internally. u"kue"_s, // A displayable program name string. i18nc("@title", "Kue"), // The program version string. QStringLiteral(KUE_VERSION_STRING), // Short description of what the app does. i18n("Application Description"), // The license this code is released under. KAboutLicense::GPL, // Copyright Statement. i18n("(c) 2024")); aboutData.addAuthor(i18nc("@info:credit", "Alexander Kavon"), i18nc("@info:credit", "Maintainer"), u"me+kue@alexkavon.com"_s, u"https://yourwebsite.com"_s); aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails")); KAboutData::setApplicationData(aboutData); QGuiApplication::setWindowIcon(QIcon::fromTheme(u"org.kde.kue"_s)); QQmlApplicationEngine engine; auto config = KueConfig::self(); qRegisterMetaType("KDescendantsProxyModel*"); qmlRegisterSingletonInstance("org.kde.kue.private", 1, 0, "Kue", config); engine.rootContext()->setContextObject(new KLocalizedContext(&engine)); engine.loadFromModule("org.kde.kue", u"Main"_s); if (engine.rootObjects().isEmpty()) { return -1; } return app.exec(); }