/** * SPDX-FileCopyrightText: 2022-2023 Bart De Vries * * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #include #include #include #ifdef Q_OS_ANDROID #include #else #include #endif #include #include #include #include #ifdef Q_OS_ANDROID Q_DECL_EXPORT #endif int main(int argc, char *argv[]) { #ifdef Q_OS_ANDROID QGuiApplication app(argc, argv); #else QApplication app(argc, argv); #endif QCoreApplication::setOrganizationName(QStringLiteral("KDE")); QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org")); QCoreApplication::setApplicationName(QStringLiteral("kmediasession-example")); QQmlApplicationEngine engine; engine.rootContext()->setContextObject(new KLocalizedContext(&engine)); KLocalizedString::setApplicationDomain("kmediasession-example"); engine.loadFromModule("org.kde.kmediasession-example", "Main"); if (engine.rootObjects().isEmpty()) { return -1; } return app.exec(); }