Commit 9737bb6a authored by Laurent Montel's avatar Laurent Montel 😁

Port to QCommandLineParser

parent 1bb5edec
......@@ -20,11 +20,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kapplication.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <K4AboutData>
#include <KAboutData>
#include <kstandarddirs.h>
#include <QApplication>
#include <KLocalizedString>
#include <QCommandLineParser>
#include "mainwin.h"
......@@ -34,26 +37,32 @@ static const char description[] = I18N_NOOP("Galactic Strategy KDE Game");
int
main(int argc, char **argv)
{
K4AboutData aboutData( "konquest", 0, ki18n("Konquest"),
KONQUEST_VERSION, ki18n(description), K4AboutData::License_GPL,
ki18n("Copyright (c) 1999-2013, Developers"), KLocalizedString(), "http://games.kde.org/konquest" );
KAboutData aboutData( "konquest", i18n("Konquest"),
KONQUEST_VERSION, i18n(description), KAboutLicense::GPL,
i18n("Copyright (c) 1999-2013, Developers"), "http://games.kde.org/konquest" );
aboutData.addAuthor(ki18n("Russ Steffen"), KLocalizedString(), "rsteffen@bayarea.net");
aboutData.addCredit(ki18n("Stephan Zehetner"), ki18n("Computer/AI Player"), "s.zehetner@nevox.org");
aboutData.addCredit(ki18n("Dmitry Suzdalev"), ki18n("Port to KDE4"), "dimsuz@gmail.com");
aboutData.addCredit(ki18n("Inge Wallin"), ki18n("Cleaning and bugfixing"), "inge@lysator.liu.se");
aboutData.addCredit(ki18n("Pierre Ducroquet"), ki18n("Cleaning and bugfixing, maintenance"), "pinaraf@gmail.com");
aboutData.addCredit(ki18n("Sean D'Epagnier"), ki18n("Gameplay Enhancements"), "geckosenator@gmail.com");
aboutData.addAuthor(i18n("Russ Steffen"), QString(), "rsteffen@bayarea.net");
aboutData.addCredit(i18n("Stephan Zehetner"), i18n("Computer/AI Player"), "s.zehetner@nevox.org");
aboutData.addCredit(i18n("Dmitry Suzdalev"), i18n("Port to KDE4"), "dimsuz@gmail.com");
aboutData.addCredit(i18n("Inge Wallin"), i18n("Cleaning and bugfixing"), "inge@lysator.liu.se");
aboutData.addCredit(i18n("Pierre Ducroquet"), i18n("Cleaning and bugfixing, maintenance"), "pinaraf@gmail.com");
aboutData.addCredit(i18n("Sean D'Epagnier"), i18n("Gameplay Enhancements"), "geckosenator@gmail.com");
KCmdLineArgs::init( argc, argv, &aboutData );
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
KApplication a;
if (a.isSessionRestored())
if (app.isSessionRestored())
RESTORE(MainWindow)
else {
MainWindow *w = new MainWindow;
w->show();
}
return a.exec();
return app.exec();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment