Initial commit.
[PrivacyBrowserPC.git] / src / main.cpp
1 /*
2     SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}>
3
4     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 */
6
7 // application header
8 #include "privacybrowserpcwindow.h"
9 #include "privacybrowserpcdebug.h"
10
11 // KF headers
12 #include <KCrash>
13 #include <KDBusService>
14 #include <KAboutData>
15 #include <KLocalizedString>
16
17 // Qt headers
18 #include <QApplication>
19 #include <QCommandLineParser>
20 #include <QIcon>
21 #include <QLoggingCategory>
22
23
24 int main(int argc, char **argv)
25 {
26     QApplication application(argc, argv);
27
28     KLocalizedString::setApplicationDomain("privacybrowserpc");
29     KCrash::initialize();
30
31     KAboutData aboutData( QStringLiteral("privacybrowserpc"),
32                           i18n("PrivacyBrowserPC"),
33                           QStringLiteral("%{VERSION}"),
34                           i18n("A Simple Application written with KDE Frameworks"),
35                           KAboutLicense::GPL,
36                           i18n("Copyright %{CURRENT_YEAR}, %{AUTHOR} <%{EMAIL}>"));
37
38     aboutData.addAuthor(i18n("%{AUTHOR}"),i18n("Author"), QStringLiteral("%{EMAIL}"));
39     aboutData.setOrganizationDomain("example.org");
40     aboutData.setDesktopFileName(QStringLiteral("org.example.privacybrowserpc"));
41
42     KAboutData::setApplicationData(aboutData);
43     application.setWindowIcon(QIcon::fromTheme(QStringLiteral("privacybrowserpc")));
44
45     QCommandLineParser parser;
46     aboutData.setupCommandLine(&parser);
47
48     parser.process(application);
49     aboutData.processCommandLine(&parser);
50
51     KDBusService appDBusService(KDBusService::Multiple | KDBusService::NoExitOnFailure);
52
53     PrivacyBrowserPCWindow *window = new PrivacyBrowserPCWindow;
54     window->show();
55
56     return application.exec();
57 }