From 77218b487ac7dafcd166becec75278ab2a87bcc9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 9 May 2017 14:06:31 +0200 Subject: A simple timeline/log/history/notification view For now this will just be a place to display notifications and some status information. --- framework/src/sinkfabric.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'framework') diff --git a/framework/src/sinkfabric.cpp b/framework/src/sinkfabric.cpp index 67d37292..f8c7e351 100644 --- a/framework/src/sinkfabric.cpp +++ b/framework/src/sinkfabric.cpp @@ -144,11 +144,23 @@ public: return; } } else if (notification.type == Sink::Notification::Error) { - if (notification.code == Sink::ApplicationDomain::ConnectionError) { - message["type"] = Notification::Warning; - message["message"] = "Failed to connect to server."; - } else { - return; + message["type"] = Notification::Warning; + message["resource"] = QString{notification.resource}; + switch(notification.code) { + case Sink::ApplicationDomain::ConnectionError: + message["message"] = "Failed to connect to server."; + break; + case Sink::ApplicationDomain::NoServerError: + message["message"] = "Host not found."; + break; + case Sink::ApplicationDomain::LoginError: + message["message"] = "Failed to login."; + break; + case Sink::ApplicationDomain::ConfigurationError: + message["message"] = "Configuration error."; + break; + default: + message["message"] = "An unknown error occurred: " + notification.message; } } else if (notification.type == Sink::Notification::Info) { if (notification.code == Sink::ApplicationDomain::TransmissionSuccess) { -- cgit v1.2.3