File indexing completed on 2024-05-12 05:13:28

0001 /*
0002    SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "grantleeeditor-version.h"
0008 #include "themeeditormainwindow.h"
0009 #include <KAboutData>
0010 #include <KCrash>
0011 #include <KDBusService>
0012 #include <KLocalizedString>
0013 #include <QApplication>
0014 #include <QCommandLineParser>
0015 #include <QIcon>
0016 int main(int argc, char **argv)
0017 {
0018     QApplication app(argc, argv);
0019     app.setDesktopFileName(QStringLiteral("org.kde.contactprintthemeeditor"));
0020     KLocalizedString::setApplicationDomain(QByteArrayLiteral("contactprintthemeeditor"));
0021     KAboutData aboutData(QStringLiteral("contactprintthemeeditor"),
0022                          i18n("Contact Print Theme Editor"),
0023                          QStringLiteral(GRANTLEEEDITOR_VERSION),
0024                          i18n("Contact Print Theme Editor"),
0025                          KAboutLicense::GPL_V2,
0026                          i18n("Copyright © 2015-%1 contactprintthemeeditor authors", QStringLiteral("2023")));
0027     aboutData.addAuthor(i18n("Laurent Montel"), i18n("Maintainer"), QStringLiteral("montel@kde.org"));
0028     QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kaddressbook")));
0029     aboutData.setProductName(QByteArray("contactprintthemeeditor"));
0030 
0031     KAboutData::setApplicationData(aboutData);
0032     KCrash::initialize();
0033 
0034     QCommandLineParser parser;
0035     aboutData.setupCommandLine(&parser);
0036 
0037     parser.process(app);
0038     aboutData.processCommandLine(&parser);
0039 
0040     KDBusService service;
0041 
0042     auto mw = new ThemeEditorMainWindow;
0043     mw->show();
0044     const int ret = app.exec();
0045     return ret;
0046 }