Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notification.cpp
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Line(s) | 272 | { | |||
---|---|---|---|---|---|
325 | 325 | | |||
326 | // Special override for KDE Connect since the notification is sent by kdeconnectd | 326 | // Special override for KDE Connect since the notification is sent by kdeconnectd | ||
327 | // but actually comes from a different app on the phone | 327 | // but actually comes from a different app on the phone | ||
328 | const QString applicationDisplayName = hints.value(QStringLiteral("x-kde-display-appname")).toString(); | 328 | const QString applicationDisplayName = hints.value(QStringLiteral("x-kde-display-appname")).toString(); | ||
329 | if (!applicationDisplayName.isEmpty()) { | 329 | if (!applicationDisplayName.isEmpty()) { | ||
330 | applicationName = applicationDisplayName; | 330 | applicationName = applicationDisplayName; | ||
331 | } | 331 | } | ||
332 | 332 | | |||
333 | deviceName = hints.value(QStringLiteral("x-kde-device-name")).toString(); | 333 | originName = hints.value(QStringLiteral("x-kde-origin-name")).toString(); | ||
334 | 334 | | |||
335 | eventId = hints.value(QStringLiteral("x-kde-eventId")).toString(); | 335 | eventId = hints.value(QStringLiteral("x-kde-eventId")).toString(); | ||
336 | 336 | | |||
337 | bool ok; | 337 | bool ok; | ||
338 | const int urgency = hints.value(QStringLiteral("urgency")).toInt(&ok); // DBus type is actually "byte" | 338 | const int urgency = hints.value(QStringLiteral("urgency")).toInt(&ok); // DBus type is actually "byte" | ||
339 | if (ok) { | 339 | if (ok) { | ||
340 | // FIXME use separate enum again | 340 | // FIXME use separate enum again | ||
341 | switch (urgency) { | 341 | switch (urgency) { | ||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | 525 | { | |||
526 | return d->applicationIconName; | 526 | return d->applicationIconName; | ||
527 | } | 527 | } | ||
528 | 528 | | |||
529 | void Notification::setApplicationIconName(const QString &applicationIconName) | 529 | void Notification::setApplicationIconName(const QString &applicationIconName) | ||
530 | { | 530 | { | ||
531 | d->applicationIconName = applicationIconName; | 531 | d->applicationIconName = applicationIconName; | ||
532 | } | 532 | } | ||
533 | 533 | | |||
534 | QString Notification::deviceName() const | 534 | QString Notification::originName() const | ||
535 | { | 535 | { | ||
536 | return d->deviceName; | 536 | return d->originName; | ||
537 | } | 537 | } | ||
538 | 538 | | |||
539 | QStringList Notification::actionNames() const | 539 | QStringList Notification::actionNames() const | ||
540 | { | 540 | { | ||
541 | return d->actionNames; | 541 | return d->actionNames; | ||
542 | } | 542 | } | ||
543 | 543 | | |||
544 | QStringList Notification::actionLabels() const | 544 | QStringList Notification::actionLabels() const | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |