From 41457eb4be1055b5bf694b0a27d9a279ee49065f Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Nov 2017 16:53:23 +0100 Subject: Show the host not found error dialog on connection error as well. --- components/kube/contents/ui/LogView.qml | 3 +++ framework/qml/Notifications.qml | 1 + framework/src/sinkfabric.cpp | 1 + 3 files changed, 5 insertions(+) diff --git a/components/kube/contents/ui/LogView.qml b/components/kube/contents/ui/LogView.qml index a328ec3e..3b0aa2d5 100644 --- a/components/kube/contents/ui/LogView.qml +++ b/components/kube/contents/ui/LogView.qml @@ -174,6 +174,9 @@ Controls.SplitView { if (subtype == Kube.Notifications.hostNotFoundError) { return hostNotFoundErrorComponent } + if (subtype == Kube.Notifications.connectionError) { + return hostNotFoundErrorComponent + } return detailsComponent } diff --git a/framework/qml/Notifications.qml b/framework/qml/Notifications.qml index 622aca86..18f2a68a 100644 --- a/framework/qml/Notifications.qml +++ b/framework/qml/Notifications.qml @@ -27,5 +27,6 @@ Item { property string loginError: "loginError" property string hostNotFoundError: "hostNotFoundError" + property string connectionError: "connectionError" } diff --git a/framework/src/sinkfabric.cpp b/framework/src/sinkfabric.cpp index 6435bd08..897534b9 100644 --- a/framework/src/sinkfabric.cpp +++ b/framework/src/sinkfabric.cpp @@ -166,6 +166,7 @@ public: switch(notification.code) { case Sink::ApplicationDomain::ConnectionError: message["message"] = QObject::tr("Failed to connect to server."); + message["subtype"] = "connectionError"; break; case Sink::ApplicationDomain::NoServerError: message["message"] = QObject::tr("Host not found."); -- cgit v1.2.3