diff options
-rw-r--r-- | framework/notifications/notificationhandler.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/framework/notifications/notificationhandler.cpp b/framework/notifications/notificationhandler.cpp index 23aa3da1..7fa392f0 100644 --- a/framework/notifications/notificationhandler.cpp +++ b/framework/notifications/notificationhandler.cpp | |||
@@ -44,16 +44,26 @@ void NotificationHandler::notify(const Sink::Notification ¬ification) | |||
44 | qWarning() << "Received notification: " << notification; | 44 | qWarning() << "Received notification: " << notification; |
45 | if (notification.type == Sink::Notification::Warning) { | 45 | if (notification.type == Sink::Notification::Warning) { |
46 | n.mType = Notification::Warning; | 46 | n.mType = Notification::Warning; |
47 | n.mMessage = notification.message; | 47 | if (notification.code == Sink::Notification::TransmissionFailed) { |
48 | n.mMessage = "Failed to send message."; | ||
49 | } else { | ||
50 | return; | ||
51 | } | ||
48 | } else if (notification.type == Sink::Notification::Status) { | 52 | } else if (notification.type == Sink::Notification::Status) { |
49 | if (notification.code == Sink::ApplicationDomain::ErrorStatus) { | 53 | if (notification.code == Sink::ApplicationDomain::ErrorStatus) { |
50 | //A resource entered error status | 54 | //A resource entered error status |
51 | n.mType = Notification::Warning; | 55 | n.mType = Notification::Warning; |
52 | n.mMessage = notification.message; | 56 | n.mMessage = "A resource experienced an error."; |
57 | } else { | ||
58 | return; | ||
53 | } | 59 | } |
54 | } else if (notification.type == Sink::Notification::Info) { | 60 | } else if (notification.type == Sink::Notification::Info) { |
55 | n.mType = Notification::Info; | 61 | n.mType = Notification::Info; |
56 | n.mMessage = notification.message; | 62 | if (notification.code == Sink::Notification::TransmissionSucceeded) { |
63 | n.mMessage = "A message has been sent."; | ||
64 | } else { | ||
65 | return; | ||
66 | } | ||
57 | } else { | 67 | } else { |
58 | return; | 68 | return; |
59 | } | 69 | } |