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
parent 864c83ffd0
commit fab782d91c

View file

@ -22,6 +22,7 @@
#include <QNetworkAccessManager>
#include <QTimer>
#include <KAboutData>
#include <KDBusService>
#include <KNotification>
#include <KLocalizedString>
@ -86,9 +87,14 @@ private:
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setApplicationName(QStringLiteral("kdeconnectd"));
app.setApplicationVersion(QStringLiteral(KDECONNECT_VERSION_STRING));
app.setOrganizationDomain(QStringLiteral("kde.org"));
KAboutData aboutData(
QStringLiteral("kdeconnectd"),
i18n("KDE Connect Daemon"),
QStringLiteral(KDECONNECT_VERSION_STRING),
i18n("KDE Connect Daemon"),
KAboutLicense::GPL
);
KAboutData::setApplicationData(aboutData);
app.setQuitOnLastWindowClosed(false);
KDBusService dbusService(KDBusService::Unique);