File indexing completed on 2022-09-20 13:02:51

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by Albert Astals Cid <aacid@kde.org>               *
0003  *                                                                         *
0004  *   This program is free software; you can redistribute it and/or modify  *
0005  *   it under the terms of the GNU General Public License as published by  *
0006  *   the Free Software Foundation; either version 2 of the License, or     *
0007  *   (at your option) any later version.                                   *
0008  ***************************************************************************/
0009 
0010 #include <KAboutData>
0011 #include <KCrash>
0012 
0013 #include <KLocalizedString>
0014 #include <QApplication>
0015 #include <QCommandLineParser>
0016 #include <KDBusService>
0017 #include "kiriki.h"
0018 
0019 #include "kiriki_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     QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
0026 #endif
0027     QApplication app(argc, argv);
0028 
0029     KLocalizedString::setApplicationDomain("kiriki");
0030     KAboutData about(QStringLiteral("kiriki"), i18n("Kiriki"),
0031             QStringLiteral(KIRIKI_VERSION_STRING),
0032             i18n("A Yahtzee dice game by KDE"),
0033             KAboutLicense::GPL,
0034             i18n("© 2005-2007 Albert Astals Cid"),
0035             QString(),
0036             QStringLiteral("https://apps.kde.org/kiriki"));
0037     about.addAuthor(i18n("Albert Astals Cid"), QString(), QStringLiteral("aacid@kde.org"));
0038 
0039     QCommandLineParser parser;
0040     KAboutData::setApplicationData(about);
0041     KCrash::initialize();
0042     about.setupCommandLine(&parser);
0043     parser.process(app);
0044     about.processCommandLine(&parser);
0045     KDBusService service;
0046     kiriki *w = new kiriki();
0047     w->show();
0048     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kiriki")));
0049     return app.exec();
0050 }