mirror of
https://invent.kde.org/network/kdeconnect-kde.git
synced 2025-10-06 00:32:40 +02:00
Simplify code and add comment
This commit is contained in:
@@ -57,12 +57,7 @@ void DesktopDaemon::askPairingConfirmation(Device *device)
|
||||
void DesktopDaemon::reportError(const QString &title, const QString &text)
|
||||
{
|
||||
qWarning() << title << ":" << text;
|
||||
KNotification *notification = new KNotification(QStringLiteral("error"));
|
||||
notification->setIconName(QStringLiteral("dialog-error"));
|
||||
notification->setComponentName(QStringLiteral("kdeconnect"));
|
||||
notification->setTitle(title);
|
||||
notification->setText(text);
|
||||
notification->sendEvent();
|
||||
sendSimpleNotification(QStringLiteral("error"), title, text, QStringLiteral("dialog-error"));
|
||||
}
|
||||
|
||||
KJobTrackerInterface *DesktopDaemon::jobTracker()
|
||||
@@ -70,6 +65,7 @@ KJobTrackerInterface *DesktopDaemon::jobTracker()
|
||||
return KIO::getJobTracker();
|
||||
}
|
||||
|
||||
// NOTE: eventId must match a notificatiion event id defined in plugins/kdeconnect.notifyrc
|
||||
Q_SCRIPTABLE void DesktopDaemon::sendSimpleNotification(const QString &eventId, const QString &title, const QString &text, const QString &iconName)
|
||||
{
|
||||
KNotification *notification = new KNotification(eventId);
|
||||
|
Reference in New Issue
Block a user