Warning, file /games/ksirk/ksirk/main.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*************************************************************************** 0002 main.cpp - description 0003 ------------------- 0004 begin : mer jui 11 22:27:28 EDT 2001 0005 copyright : (C) 2001 by Gaël de Chalendar 0006 email : Gael.de.Chalendar@free.fr 0007 0008 This is the standard main function of a KDE application simplified for KsirK 0009 0010 ***************************************************************************/ 0011 0012 /*************************************************************************** 0013 * * 0014 * This program is free software; you can redistribute it and/or modify * 0015 * it under the terms of the GNU General Public License as published by * 0016 * the Free Software Foundation; either either version 2 0017 of the License, or (at your option) any later version.of the License, or * 0018 * (at your option) any later version. * 0019 * * 0020 ***************************************************************************/ 0021 0022 #include "kgamewin.h" 0023 #include "GameLogic/gameautomaton.h" 0024 #include <KAboutData> 0025 #include <KCrash> 0026 #include "ksirk_debug.h" 0027 #include <QApplication> 0028 #include <QCommandLineParser> 0029 0030 #include "../ksirk_version.h" 0031 0032 int main(int argc, char *argv[]) 0033 { 0034 qCDebug(KSIRK_LOG) << "Hello KsirK"; 0035 // Fixes blurry icons with fractional scaling 0036 QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 0037 QApplication app(argc, argv); 0038 0039 KLocalizedString::setApplicationDomain("ksirk"); 0040 0041 KAboutData aboutData(QStringLiteral("ksirk"), 0042 i18n("KsirK"), 0043 QStringLiteral(KSIRK_VERSION_STRING), 0044 i18n("KsirK - World Domination Strategy Game"), 0045 KAboutLicense::GPL, 0046 i18n("(c) 2002-2015, Gaël de Chalendar\n"), 0047 i18n("For help and user manual, please see\nthe KsirK web site."), 0048 QStringLiteral("https://apps.kde.org/ksirk")); 0049 0050 aboutData.addAuthor(i18n("Gaël de Chalendar aka Kleag"),QStringLiteral(), QStringLiteral("kleag@free.fr")); 0051 aboutData.addAuthor(i18n("Nemanja Hirsl"),i18n("Current maintainer"), QStringLiteral("nemhirsl@gmail.com")); 0052 aboutData.addAuthor(i18n("Robin Doer")); 0053 aboutData.addAuthor(i18n("Albert Astals Cid")); 0054 aboutData.addAuthor(i18n("Michal Golunski (Polish translation)"),QStringLiteral(), QStringLiteral("michalgolunski@o2.pl")); 0055 aboutData.addAuthor(i18n("French students of the 'IUP ISI 2007-2008':")); 0056 aboutData.addAuthor(i18n(" Anthony Rey<br/> Benjamin Lucas<br/> Benjamin Moreau<br/> Gaël Clouet<br/> Guillaume Pelouas<br/> Joël Marco<br/> Laurent Dang<br/> Nicolas Linard<br/> Vincent Sac")); 0057 0058 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("ksirk"))); 0059 KAboutData::setApplicationData(aboutData); 0060 KCrash::initialize(); 0061 QCommandLineParser parser; 0062 aboutData.setupCommandLine(&parser); 0063 parser.process(app); 0064 aboutData.processCommandLine(&parser); 0065 0066 if (app.isSessionRestored()) 0067 { 0068 kRestoreMainWindows<Ksirk::KGameWindow>(); 0069 } 0070 else 0071 { 0072 qCDebug(KSIRK_LOG) << "Creating main window"; 0073 Ksirk::KGameWindow *ksirk = new Ksirk::KGameWindow(); 0074 ksirk->show(); 0075 } 0076 0077 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("ksirk"))); 0078 0079 qCDebug(KSIRK_LOG) << "Executing app"; 0080 return app.exec(); 0081 }