File indexing completed on 2024-04-14 05:39:34
0001 // SPDX-License-Identifier: GPL-3.0-or-later 0002 /* 0003 Copyright 2017 - 2023 Martin Koller, kollix@aon.at 0004 0005 This file is part of liquidshell. 0006 0007 liquidshell is free software: you can redistribute it and/or modify 0008 it under the terms of the GNU General Public License as published by 0009 the Free Software Foundation, either version 3 of the License, or 0010 (at your option) any later version. 0011 0012 liquidshell is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0015 GNU General Public License for more details. 0016 0017 You should have received a copy of the GNU General Public License 0018 along with liquidshell. If not, see <http://www.gnu.org/licenses/>. 0019 */ 0020 0021 #include <QApplication> 0022 #include <QCommandLineParser> 0023 #include <QDBusMessage> 0024 #include <QDBusConnection> 0025 #include <QDBusPendingCall> 0026 0027 #include <DesktopWidget.hxx> 0028 0029 #include <KCrash> 0030 #include <KLocalizedString> 0031 #include <KAboutData> 0032 #include <KDBusService> 0033 0034 int main(int argc, char **argv) 0035 { 0036 #if QT_VERSION >= QT_VERSION_CHECK(5,7,0) 0037 QCoreApplication::setAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles); 0038 #endif 0039 0040 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 0041 0042 QApplication app(argc, argv); 0043 0044 KLocalizedString::setApplicationDomain("liquidshell"); 0045 0046 KAboutData aboutData("liquidshell", i18n("Liquidshell"), "1.9", 0047 i18n("A QtWidgets based basic desktop shell"), 0048 KAboutLicense::GPL_V3, 0049 i18n("Copyright 2017 - 2023 Martin Koller"), QString(), 0050 "https://apps.kde.org/de/liquidshell"); // homepage 0051 //"https://www.linux-apps.com/p/1205621"); // homepage 0052 0053 aboutData.addAuthor("Martin Koller", "", "kollix@aon.at"); 0054 0055 KAboutData::setApplicationData(aboutData); 0056 0057 QCommandLineParser parser; 0058 aboutData.setupCommandLine(&parser); 0059 parser.process(app); 0060 aboutData.processCommandLine(&parser); 0061 0062 KCrash::setFlags(KCrash::AutoRestart); 0063 KDBusService programDBusService(KDBusService::Unique | KDBusService::NoExitOnFailure); 0064 0065 DesktopWidget desktop; 0066 desktop.show(); 0067 0068 QDBusMessage ksplashProgressMessage = 0069 QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"), 0070 QStringLiteral("/KSplash"), 0071 QStringLiteral("org.kde.KSplash"), 0072 QStringLiteral("setStage")); 0073 ksplashProgressMessage.setArguments(QList<QVariant>() << QStringLiteral("desktop")); 0074 QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage); 0075 0076 return app.exec(); 0077 }