File indexing completed on 2024-05-05 04:02:04
0001 /* 0002 SPDX-FileCopyrightText: 2007-2008 John-Paul Stanford <jp@stanwood.org.uk> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 // Qt 0008 #include <QApplication> 0009 #include <QCommandLineParser> 0010 0011 // KF 0012 #include <KAboutData> 0013 #include <KCrash> 0014 #include <KDBusService> 0015 #include <KLocalizedString> 0016 0017 // Bomber 0018 #include "bomber.h" 0019 #include "bomber_version.h" 0020 0021 int main(int argc, char ** argv) 0022 { 0023 QApplication app(argc, argv); 0024 0025 KLocalizedString::setApplicationDomain(QByteArrayLiteral("bomber")); 0026 0027 KAboutData about(QStringLiteral("bomber"), i18n("Bomber"), 0028 QStringLiteral(BOMBER_VERSION_STRING), 0029 i18n("Arcade bombing game"), 0030 KAboutLicense::GPL, i18n("(C) 2007 John-Paul Stanford"), 0031 QString(), 0032 QStringLiteral("https://apps.kde.org//bomber")); 0033 about.addAuthor(i18n("John-Paul Stanford"), QString(), 0034 QStringLiteral("jp@stanwood.org.uk")); 0035 about.addAuthor(i18n("Mehmet Emre"), i18n("Porting to QGraphicsView."), 0036 QStringLiteral("maemre2@gmail.com")); 0037 KAboutData::setApplicationData(about); 0038 0039 KCrash::initialize(); 0040 0041 QCommandLineParser parser; 0042 about.setupCommandLine(&parser); 0043 parser.process(app); 0044 about.processCommandLine(&parser); 0045 0046 KDBusService service; 0047 0048 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("bomber"))); 0049 0050 // see if we are starting with session management 0051 if (app.isSessionRestored()) { 0052 kRestoreMainWindows<Bomber>(); 0053 } else { 0054 auto widget = new Bomber; 0055 widget->setMinimumSize(320, 200); 0056 widget->show(); 0057 widget->readSettings(); 0058 } 0059 0060 return app.exec(); 0061 }