-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.cc
81 lines (66 loc) · 3.16 KB
/
main.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* SPDX-FileCopyrightText: 1999 Reginald Stadlbauer <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <QApplication>
#include <QCommandLineParser>
#include <KAboutData>
#include <KCrash>
#include <KLocalizedString>
#define HAVE_KICONTHEME __has_include(<KIconTheme>)
#if HAVE_KICONTHEME
#include <KIconTheme>
#endif
#define HAVE_STYLE_MANAGER __has_include(<KStyleManager>)
#if HAVE_STYLE_MANAGER
#include <KStyleManager>
#endif
#include "kcharselect_version.h"
#include "kcharselectdia.h"
int main(int argc, char **argv)
{
#if HAVE_KICONTHEME && (KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0))
KIconTheme::initTheme();
#endif // HAVE_KICONTHEME && KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0)
QApplication app(argc, argv);
#if HAVE_STYLE_MANAGER
KStyleManager::initStyle();
#else // !HAVE_STYLE_MANAGER
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
QApplication::setStyle(QStringLiteral("breeze"));
#endif // defined(Q_OS_MACOS) || defined(Q_OS_WIN)
#endif // HAVE_STYLE_MANAGER
KLocalizedString::setApplicationDomain(QByteArrayLiteral("kcharselect"));
KAboutData aboutData(QStringLiteral("kcharselect"),
i18n("KCharSelect"),
QStringLiteral(KCHARSELECT_VERSION_STRING),
i18n("KDE character selection utility"),
KAboutLicense::GPL,
QString(),
i18n("A wrapper around the KCharSelect widget."),
QStringLiteral("https://apps.kde.org/kcharselect"));
aboutData.addAuthor(i18n("Christoph Feck"), i18n("KF5 port and current maintainer"), QStringLiteral("[email protected]"));
aboutData.addAuthor(i18n("Daniel Laidig"), i18n("Author and previous maintainer"), QStringLiteral("[email protected]"));
aboutData.addAuthor(i18n("Reginald Stadlbauer"), i18n("Author"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Daniel Laidig"),
i18n("New GUI, Unicode information, incremental search,"
" and general improvements"),
QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Laurent Montel"), i18n("Porting help"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Constantin Berzan"), i18n("Previous maintainer"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Nadeem Hasan"), i18n("GUI cleanup and fixes"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Ryan Cumming"), i18n("GUI cleanup and fixes"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Benjamin C. Meyer"), i18n("XMLUI conversion"), QStringLiteral("[email protected]"));
aboutData.addCredit(i18n("Bryce Nesbitt"), i18n("RTL support"));
KAboutData::setApplicationData(aboutData);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("accessories-character-map")));
KCrash::initialize();
QCommandLineParser parser;
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
KCharSelectDia *dia = new KCharSelectDia;
dia->show();
return app.exec();
}