File indexing completed on 2022-10-04 14:29:25

0001 /*
0002     SPDX-FileCopyrightText: 2007 Paolo Capriotti <p.capriotti@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 
0008 #include <KAboutData>
0009 #include <KCrash>
0010 
0011 #include <QApplication>
0012 #include <KLocalizedString>
0013 #include <QCommandLineParser>
0014 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0015 #include <kdelibs4configmigrator.h>
0016 #endif
0017 #include <KDBusService>
0018 #include "mainwindow.h"
0019 #include "kollision_version.h"
0020 
0021 int main(int argc, char *argv[])
0022 {
0023     // Fixes blurry icons with fractional scaling
0024 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0025     QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
0026 #endif
0027     QApplication app(argc, argv);
0028 
0029     KLocalizedString::setApplicationDomain("kollision");
0030 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0031     Kdelibs4ConfigMigrator migrate(QStringLiteral("kollision"));
0032     migrate.setConfigFiles(QStringList() << QStringLiteral("kollisionrc"));
0033     migrate.setUiFiles(QStringList() << QStringLiteral("kollisionui.rc"));
0034     migrate.migrate();
0035 #endif
0036 
0037     KAboutData aboutData(QStringLiteral("kollision"), i18n("Kollision"),
0038                          QStringLiteral(KOLLISION_VERSION_STRING),
0039                          i18n("Casual ball game"),
0040                          KAboutLicense::GPL,
0041                          i18n("(c) 2007 Paolo Capriotti"),
0042                          QString(),
0043                          QStringLiteral("https://apps.kde.org/kollision"));
0044     aboutData.addAuthor(i18n("Paolo Capriotti"), QString(), QStringLiteral("p.capriotti@gmail.com"));
0045     aboutData.addAuthor(i18n("Dmitry Suzdalev"), QString(), QStringLiteral("dimsuz@gmail.com"));
0046     aboutData.addCredit(i18n("Matteo Guarnieri"), i18n("Original idea"));
0047     aboutData.addCredit(i18n("Brian Croom"), i18n("Port to use KGameRenderer"));
0048 
0049 
0050     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kollision")));
0051 
0052     QCommandLineParser parser;
0053     KAboutData::setApplicationData(aboutData);
0054     KCrash::initialize();
0055     aboutData.setupCommandLine(&parser);
0056     parser.process(app);
0057     aboutData.processCommandLine(&parser);
0058     KDBusService service;
0059 
0060     MainWindow* window = new MainWindow;
0061     window->show();
0062     
0063     return app.exec();
0064 }