File indexing completed on 2024-02-18 04:03:26

0001 /*
0002     SPDX-FileCopyrightText: 2009 Mathias Kraus <k.hias@gmx.de>
0003     SPDX-FileCopyrightText: 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #include "mainwindow.h"
0009 
0010 #include "granatier_version.h"
0011 
0012 #include <KAboutData>
0013 #include <KCrash>
0014 #include <KLocalizedString>
0015 
0016 #include <QApplication>
0017 #include <QCommandLineParser>
0018 #include <QDir>
0019 #include <KDBusService>
0020 
0021 int main(int argc, char** argv)
0022 {
0023     QApplication app(argc, argv);
0024 
0025     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("granatier")));
0026     KLocalizedString::setApplicationDomain(QByteArrayLiteral("granatier"));
0027 
0028     // About Granatier
0029     KAboutData about(QStringLiteral("granatier"),  i18n("Granatier"),
0030         QStringLiteral(GRANATIER_VERSION_STRING),
0031         i18n("Granatier is a Bomberman Clone!"),
0032         KAboutLicense::GPL, i18n("Copyright (c) 2009-2015 The Granatier Team!"),
0033         QString(),
0034         QStringLiteral("https://apps.kde.org/granatier")
0035     );
0036     about.addAuthor(i18n("Mathias Kraus"), i18n("Maintainer"), QStringLiteral("k.hias@gmx.de"));
0037     about.addCredit(i18n("Arturo Silva"), i18n("Most of the beautiful granatier graphics"));
0038     about.addCredit(i18n("Thomas Gallinari"), i18n("Developer of Kapman, which was the base of Granatier"), QStringLiteral("tg8187@yahoo.fr"));
0039     about.addCredit(i18n("Pierre-Benoit Besse"), i18n("Developer of Kapman, which was the base of Granatier"), QStringLiteral("besse.pb@gmail.com"));
0040     about.addCredit(i18n("Romain Castan"), i18n("Developer of Kapman, which was the base of Granatier"), QStringLiteral("romaincastan@gmail.com"));
0041     about.addCredit(i18n("Alexandre Galinier"), i18n("Developer of Kapman, which was the base of Granatier"), QStringLiteral("alex.galinier@gmail.com"));
0042     about.addCredit(i18n("Nathalie Liesse"), i18n("Developer of Kapman, which was the base of Granatier"), QStringLiteral("nathalie.liesse@gmail.com"));
0043 
0044     KAboutData::setApplicationData(about);
0045 
0046     KCrash::initialize();
0047 
0048     // Command line arguments
0049     QCommandLineParser parser;
0050     about.setupCommandLine(&parser);
0051     parser.process(app);
0052     about.processCommandLine(&parser);
0053 
0054     KDBusService service;
0055     // Create the application
0056     // Create the main window
0057     auto* window = new MainWindow();
0058     // Show the main window
0059     window->show();
0060     // Execute the application
0061     return app.exec();
0062 }