File indexing completed on 2024-04-21 03:41:52

0001 /***************************************************************************
0002  *   Copyright (C) 2004-2005 by Albert Astals Cid                          *
0003  *   aacid@kde.org                                                         *
0004  *                                                                         *
0005  *   This program 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 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #include <KAboutData>
0012 #include <KLocalizedString>
0013 #include <QApplication>
0014 #include <QCommandLineParser>
0015 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0016 #include <Kdelibs4ConfigMigrator>
0017 #endif
0018 #include <KCrash>
0019 #include "kgeography.h"
0020 #include "kgeography_version.h"
0021 
0022 int main(int argc, char *argv[])
0023 {
0024         QApplication app(argc, argv);
0025 
0026 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0027     Kdelibs4ConfigMigrator migrate(QStringLiteral("kgeography"));
0028     migrate.setConfigFiles(QStringList() << QStringLiteral("kgeographyrc"));
0029     migrate.setUiFiles(QStringList() << QStringLiteral("kgeographyui.rc"));
0030     migrate.migrate();
0031 #endif
0032     KLocalizedString::setApplicationDomain("kgeography");
0033 
0034     KAboutData about(QStringLiteral("kgeography"), i18n("KGeography"), QStringLiteral(KGEOGRAPHY_VERSION_STRING), i18n("A Geography learning program"), KAboutLicense::GPL, i18n("© 2004-2005 Albert Astals Cid"), QString(), QStringLiteral("https://userbase.kde.org/KGeography"));
0035     about.addAuthor(i18n("Albert Astals Cid"), i18n("Programmer and designer"), QStringLiteral("aacid@kde.org"));
0036 
0037     KAboutData::setApplicationData(about);
0038 
0039         app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kgeography")));
0040 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0041     app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
0042 #endif
0043     KCrash::initialize();
0044 
0045     QCommandLineParser parser;
0046     about.setupCommandLine(&parser);
0047     parser.process(app);
0048     about.processCommandLine(&parser);
0049 
0050     new kgeography();
0051 
0052     return app.exec();
0053 }