Skip to content
Snippets Groups Projects
Commit fdf953c9 authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez
Browse files

dbus: assume DBus InstanceInterface instance is not valid

In most use cases the client launches the daemon via dbus on start.
Thus we expect the InstanceInterface to have an error as the
daemon is not initially present on the dbus.

Issue: #80493
Change-Id: I5b5ebab4662d5e543eae142eefb4531b09327ab1
parent c40c1400
No related branches found
No related tags found
No related merge requests found
......@@ -46,11 +46,15 @@ InstanceInterface& DBus::InstanceManager::instance()
registered = true;
reply.waitForFinished();
}
if (!interface->isValid()) {
GlobalInstances::dBusErrorHandler().invalidInterfaceError(
"Error : dring is not available, make sure it is running"
);
}
/* we do not check if the interface isValid;
* isValid() return 'false' if there was any error;
* we expect there to be an error when we first launch the client and the daemon is not yet
* running;
* TODO: check if we get the expected error, or another, see:
* http://doc.qt.io/qt-4.8/qdbuserror.html#ErrorType-enum
*/
#endif
return *interface;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment