Use KAboutData to set information about the daemon

Summary:
I noticed this when the daemon crashed and drkonqi refused to submit
a bug report, complaining about a missing bug reporting address.
Additionally, using KAboutData also saves initialising some
properties of QCoreApplication manually.

Test Plan:
sent SIGSEGV to kdeconnect, could've reported the crash
with drkonqi; checked with GammaRay that the properties of
QCoreApplication are initialised.

Reviewers: #kde_connect

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D18542
This commit is contained in:
Heiko Becker 2019-01-25 22:32:34 +01:00 committed by Albert Vaca Cintora
parent 095560f0be
commit 9898735959

View file

@ -28,6 +28,7 @@
#include <QDBusConnection> #include <QDBusConnection>
#include <QSessionManager> #include <QSessionManager>
#include <KAboutData>
#include <KDBusService> #include <KDBusService>
#include <KNotification> #include <KNotification>
#include <KLocalizedString> #include <KLocalizedString>
@ -92,9 +93,14 @@ private:
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("kdeconnectd")); KAboutData aboutData(
app.setApplicationVersion(QStringLiteral(KDECONNECT_VERSION_STRING)); QStringLiteral("kdeconnectd"),
app.setOrganizationDomain(QStringLiteral("kde.org")); i18n("KDE Connect Daemon"),
QStringLiteral(KDECONNECT_VERSION_STRING),
i18n("KDE Connect Daemon"),
KAboutLicense::GPL
);
KAboutData::setApplicationData(aboutData);
app.setQuitOnLastWindowClosed(false); app.setQuitOnLastWindowClosed(false);
QCommandLineParser parser; QCommandLineParser parser;