File indexing completed on 2024-06-16 07:03:20

0001 /*
0002     SPDX-FileCopyrightText: 2003 Russell Steffen <rsteffen@bayarea.net>
0003     SPDX-FileCopyrightText: 2003 Stephan Zehetner <s.zehetner@nevox.org>
0004     SPDX-FileCopyrightText: 2006 Dmitry Suzdalev <dimsuz@gmail.com>
0005     SPDX-FileCopyrightText: 2006 Inge Wallin <inge@lysator.liu.se>
0006     SPDX-FileCopyrightText: 2006 Pierre Ducroquet <pinaraf@gmail.com>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #include "mainwin.h"
0012 #include "konquest_version.h"
0013 
0014 #include <KAboutData>
0015 #include <KCrash>
0016 #include <KDBusService>
0017 #include <KLocalizedString>
0018 
0019 #include <QApplication>
0020 #include <QCommandLineParser>
0021 
0022 int
0023 main(int argc, char **argv)
0024 {
0025     QApplication app(argc, argv);
0026 
0027     KLocalizedString::setApplicationDomain("konquest");
0028     KAboutData aboutData( QStringLiteral("konquest"), i18n("Konquest"),
0029         QStringLiteral(KONQUEST_VERSION_STRING),
0030         i18n("Galactic Strategy Game"),
0031         KAboutLicense::GPL,
0032         i18n("Copyright (c) 1999-2013, Developers"),
0033         QString(),
0034         QStringLiteral("https://apps.kde.org/konquest") );
0035 
0036     aboutData.addAuthor(i18n("Russ Steffen"), QString(), QStringLiteral("rsteffen@bayarea.net"));
0037     aboutData.addCredit(i18n("Stephan Zehetner"), i18n("Computer/AI Player"), QStringLiteral("s.zehetner@nevox.org"));
0038     aboutData.addCredit(i18n("Dmitry Suzdalev"), i18n("Port to KDE4"), QStringLiteral("dimsuz@gmail.com"));
0039     aboutData.addCredit(i18n("Inge Wallin"), i18n("Cleaning and bugfixing"), QStringLiteral("inge@lysator.liu.se"));
0040     aboutData.addCredit(i18n("Pierre Ducroquet"), i18n("Cleaning and bugfixing, maintenance"), QStringLiteral("pinaraf@gmail.com"));
0041     aboutData.addCredit(i18n("Sean D'Epagnier"), i18n("Gameplay Enhancements"), QStringLiteral("geckosenator@gmail.com"));
0042 
0043     KAboutData::setApplicationData(aboutData);
0044     QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("konquest")));
0045 
0046     KCrash::initialize();
0047 
0048     QCommandLineParser parser;
0049     aboutData.setupCommandLine(&parser);
0050     parser.process(app);
0051     aboutData.processCommandLine(&parser);
0052 
0053     KDBusService service;
0054 
0055     if (app.isSessionRestored())
0056         kRestoreMainWindows<MainWindow>();
0057     else {
0058         MainWindow *w = new MainWindow;
0059         w->show();
0060     }
0061 
0062     return app.exec();
0063 }