aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-08 16:42:51 +0200
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-08 16:42:51 +0200
commit6bea345ecf8a6cc451b2a7434b8294acacfbe0b4 (patch)
tree8cd5930bb4ffc73c1e858fa6bb640831304239ba /src
parent98b66c89d01cf49625bf084ed0167386e9767292 (diff)
downloadRWA.Support.DesktopApp-6bea345ecf8a6cc451b2a7434b8294acacfbe0b4.tar.gz
RWA.Support.DesktopApp-6bea345ecf8a6cc451b2a7434b8294acacfbe0b4.tar.bz2
RWA.Support.DesktopApp-6bea345ecf8a6cc451b2a7434b8294acacfbe0b4.zip
At QDBusError: Give the user a hint that the session service is not started.
Diffstat (limited to 'src')
-rw-r--r--src/DBusAPI.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/DBusAPI.cpp b/src/DBusAPI.cpp
index 18c5974..760935b 100644
--- a/src/DBusAPI.cpp
+++ b/src/DBusAPI.cpp
@@ -82,7 +82,12 @@ void DBusAPI::start_reply(QDBusPendingCallWatcher *call) {
qCritical() << "D-Bus 'start' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceStartResponse(nullptr);
+
return;
} else {
result = reply.argumentAt<0>();
@@ -143,7 +148,13 @@ void DBusAPI::stop_reply(QDBusPendingCallWatcher *call) {
qCritical() << "D-Bus 'stop' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceStopResponse(nullptr);
+
+ return;
} else {
result = reply.argumentAt<0>();
}
@@ -232,7 +243,12 @@ void DBusAPI::status_reply(QDBusPendingCallWatcher *call){
qCritical() << "D-Bus '(refresh_)status' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceStatusResponse(nullptr);
+
return;
} else {
result = reply.argumentAt<0>();
@@ -319,7 +335,12 @@ void DBusAPI::get_web_app_hosts_reply(QDBusPendingCallWatcher *call){
qCritical() << "D-Bus 'get_web_app_hosts' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceGetWebAppHostsResponse(nullptr);
+
return;
} else {
result = reply.argumentAt<0>();
@@ -348,7 +369,12 @@ void DBusAPI::add_web_app_host_reply(QDBusPendingCallWatcher *call){
qCritical() << "D-Bus 'add_web_app_host' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceAddWebAppHostResponse(nullptr);
+
return;
} else {
result = reply.argumentAt<0>();
@@ -377,7 +403,12 @@ void DBusAPI::remove_web_app_host_reply(QDBusPendingCallWatcher *call){
qCritical() << "D-Bus 'remove_web_app_host' request failed, this was the reply:";
qCritical() << reply.error();
+ if (QDBusError::ServiceUnknown == reply.error().type()) {
+ qCritical() << "The session service was probably just not started!";
+ }
+
emit serviceRemoveWebAppHostResponse(nullptr);
+
return;
} else {
result = reply.argumentAt<0>();