mirror of https://github.com/nymea/nymea.git
fix mocks to properly deal with the new way of reconfiguring
parent
573a2c061a
commit
d529a27df1
|
|
@ -54,6 +54,7 @@ StateHandler::StateHandler(QObject *parent) :
|
|||
JsonHandler(parent)
|
||||
{
|
||||
registerEnum<Types::Unit>();
|
||||
registerEnum<Types::IOType>();
|
||||
registerObject<State>();
|
||||
registerObject<StateType>();
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@ void IntegrationPluginMock::discoverThings(ThingDiscoveryInfo *info)
|
|||
void IntegrationPluginMock::setupThing(ThingSetupInfo *info)
|
||||
{
|
||||
if (info->thing()->thingClassId() == mockThingClassId || info->thing()->thingClassId() == autoMockThingClassId) {
|
||||
if (m_daemons.contains(info->thing())) {
|
||||
// We already have a daemon, seem's we're reconfiguring
|
||||
delete m_daemons.take(info->thing());
|
||||
}
|
||||
|
||||
bool async = false;
|
||||
bool broken = false;
|
||||
if (info->thing()->thingClassId() == mockThingClassId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue