Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notification.cpp
Show First 20 Lines • Show All 374 Lines • ▼ Show 20 Line(s) | 374 | case 1: | |||
---|---|---|---|---|---|
375 | setUrgency(Notifications::NormalUrgency); | 375 | setUrgency(Notifications::NormalUrgency); | ||
376 | break; | 376 | break; | ||
377 | case 2: | 377 | case 2: | ||
378 | setUrgency(Notifications::CriticalUrgency); | 378 | setUrgency(Notifications::CriticalUrgency); | ||
379 | break; | 379 | break; | ||
380 | } | 380 | } | ||
381 | } | 381 | } | ||
382 | 382 | | |||
383 | userActionFeedback = hints.value(QStringLiteral("x-kde-user-action-feedback")).toBool(); | ||||
384 | if (userActionFeedback) { | ||||
385 | // A confirmation of an explicit user interaction is assumed to have been seen by the user. | ||||
386 | read = true; | ||||
387 | } | ||||
388 | | ||||
383 | urls = QUrl::fromStringList(hints.value(QStringLiteral("x-kde-urls")).toStringList()); | 389 | urls = QUrl::fromStringList(hints.value(QStringLiteral("x-kde-urls")).toStringList()); | ||
384 | 390 | | |||
385 | // Underscored hints was in use in version 1.1 of the spec but has been | 391 | // Underscored hints was in use in version 1.1 of the spec but has been | ||
386 | // replaced by dashed hints in version 1.2. We need to support it for | 392 | // replaced by dashed hints in version 1.2. We need to support it for | ||
387 | // users of the 1.2 version of the spec. | 393 | // users of the 1.2 version of the spec. | ||
388 | auto it = hints.find(QStringLiteral("image-data")); | 394 | auto it = hints.find(QStringLiteral("image-data")); | ||
389 | if (it == end) { | 395 | if (it == end) { | ||
390 | it = hints.find(QStringLiteral("image_data")); | 396 | it = hints.find(QStringLiteral("image_data")); | ||
▲ Show 20 Lines • Show All 256 Lines • ▼ Show 20 Line(s) | 652 | { | |||
647 | d->urls = urls; | 653 | d->urls = urls; | ||
648 | } | 654 | } | ||
649 | 655 | | |||
650 | Notifications::Urgency Notification::urgency() const | 656 | Notifications::Urgency Notification::urgency() const | ||
651 | { | 657 | { | ||
652 | return d->urgency; | 658 | return d->urgency; | ||
653 | } | 659 | } | ||
654 | 660 | | |||
661 | bool Notification::userActionFeedback() const | ||||
662 | { | ||||
663 | return d->userActionFeedback; | ||||
664 | } | ||||
665 | | ||||
655 | int Notification::timeout() const | 666 | int Notification::timeout() const | ||
656 | { | 667 | { | ||
657 | return d->timeout; | 668 | return d->timeout; | ||
658 | } | 669 | } | ||
659 | 670 | | |||
660 | void Notification::setTimeout(int timeout) | 671 | void Notification::setTimeout(int timeout) | ||
661 | { | 672 | { | ||
662 | d->timeout = timeout; | 673 | d->timeout = timeout; | ||
Show All 36 Lines |