diff options
-rw-r--r-- | src/DBusAPI.cpp | 31 |
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>(); |