File indexing completed on 2021-12-23 10:45:19

0001 /*
0002  * SPDX-FileCopyrightText: 1999 Reginald Stadlbauer <reggie@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #include <QApplication>
0008 #include <QCommandLineParser>
0009 
0010 #include <KAboutData>
0011 #include <KCrash>
0012 #include <KLocalizedString>
0013 #include <Kdelibs4ConfigMigrator>
0014 
0015 #include "kcharselect_version.h"
0016 #include "kcharselectdia.h"
0017 
0018 int main(int argc, char **argv)
0019 {
0020     QApplication app(argc, argv);
0021     KCrash::initialize();
0022 
0023     KLocalizedString::setApplicationDomain("kcharselect");
0024 
0025 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0026     /**
0027      * enable high dpi support
0028      */
0029     app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
0030 
0031     Kdelibs4ConfigMigrator migrate(QStringLiteral("kcharselect"));
0032     migrate.setConfigFiles(QStringList() << QStringLiteral("kcharselectrc"));
0033     migrate.setUiFiles(QStringList() << QStringLiteral("kcharselectui.rc"));
0034     migrate.migrate();
0035 #endif
0036 
0037     KAboutData aboutData(QStringLiteral("kcharselect"),
0038                          i18n("KCharSelect"),
0039                          QStringLiteral(KCHARSELECT_VERSION_STRING),
0040                          i18n("KDE character selection utility"),
0041                          KAboutLicense::GPL,
0042                          QString(),
0043                          i18n("A wrapper around the KCharSelect widget."),
0044                          QStringLiteral("https://utils.kde.org/projects/kcharselect/"));
0045 
0046     aboutData.addAuthor(i18n("Christoph Feck"), i18n("KF5 port and current maintainer"), QStringLiteral("cfeck@kde.org"));
0047     aboutData.addAuthor(i18n("Daniel Laidig"), i18n("Author and previous maintainer"), QStringLiteral("d.laidig@gmx.de"));
0048     aboutData.addAuthor(i18n("Reginald Stadlbauer"), i18n("Author"), QStringLiteral("reggie@kde.org"));
0049 
0050     aboutData.addCredit(i18n("Daniel Laidig"),
0051                         i18n("New GUI, Unicode information, incremental search,"
0052                              " and general improvements"),
0053                         QStringLiteral("d.laidig@gmx.de"));
0054     aboutData.addCredit(i18n("Laurent Montel"), i18n("Porting help"), QStringLiteral("montel@kde.org"));
0055     aboutData.addCredit(i18n("Constantin Berzan"), i18n("Previous maintainer"), QStringLiteral("exit3219@gmail.com"));
0056     aboutData.addCredit(i18n("Nadeem Hasan"), i18n("GUI cleanup and fixes"), QStringLiteral("nhasan@kde.org"));
0057     aboutData.addCredit(i18n("Ryan Cumming"), i18n("GUI cleanup and fixes"), QStringLiteral("bodnar42@phalynx.dhs.org"));
0058     aboutData.addCredit(i18n("Benjamin C. Meyer"), i18n("XMLUI conversion"), QStringLiteral("ben+kcharselect@meyerhome.net"));
0059     aboutData.addCredit(i18n("Bryce Nesbitt"), i18n("RTL support"));
0060 
0061     KAboutData::setApplicationData(aboutData);
0062     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("accessories-character-map")));
0063 
0064     QCommandLineParser parser;
0065     aboutData.setupCommandLine(&parser);
0066     parser.process(app);
0067     aboutData.processCommandLine(&parser);
0068 
0069     KCharSelectDia *dia = new KCharSelectDia;
0070     dia->show();
0071 
0072     return app.exec();
0073 }