File indexing completed on 2024-11-24 03:43:18
0001 /******************************************************************* 0002 * 0003 * Copyright 2007 Aron Boström <c02ab@efd.lth.se> 0004 * 0005 * Bovo is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2, or (at your option) 0008 * any later version. 0009 * 0010 * Bovo is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU General Public License 0016 * along with Bovo; see the file COPYING. If not, write to 0017 * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 * 0020 ********************************************************************/ 0021 0022 #include <QApplication> 0023 #include <QCommandLineParser> 0024 #include <KAboutData> 0025 #include <KLocalizedString> 0026 #include <KDBusService> 0027 #include <KCrash> 0028 0029 #include "mainwindow.h" 0030 #include "bovo_version.h" 0031 0032 using namespace gui; 0033 0034 int main(int argc, char **argv) { 0035 0036 QApplication app(argc, argv); 0037 0038 KLocalizedString::setApplicationDomain(QByteArrayLiteral("bovo")); 0039 0040 KAboutData aboutData(QStringLiteral("bovo"), i18n("Bovo"), 0041 QStringLiteral(BOVO_VERSION_STRING), i18n("KDE Five in a Row Board Game"), KAboutLicense::GPL, 0042 i18n("(c) 2002-2007, Aron Boström"), 0043 QString(), 0044 QStringLiteral("https://apps.kde.org/bovo")); 0045 aboutData.addAuthor(i18n("Aron Boström"),i18n("Author"), 0046 QStringLiteral("aron.bostrom@gmail.com")); 0047 0048 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("bovo"))); 0049 0050 KAboutData::setApplicationData(aboutData); 0051 KCrash::initialize(); 0052 0053 QCommandLineParser parser; 0054 aboutData.setupCommandLine(&parser); 0055 parser.process(app); 0056 aboutData.processCommandLine(&parser); 0057 KDBusService service; 0058 if( app.isSessionRestored() ) { 0059 kRestoreMainWindows<MainWindow>(); 0060 } else { 0061 auto mainWin = new MainWindow(); 0062 mainWin->show(); 0063 } 0064 0065 return app.exec(); 0066 }