fix discovery response in json
This commit is contained in:
parent
60693ccb69
commit
33e64038fa
@ -154,6 +154,7 @@ DeviceHandler::DeviceHandler(QObject *parent) :
|
|||||||
setParams("StateChanged", params);
|
setParams("StateChanged", params);
|
||||||
|
|
||||||
connect(GuhCore::instance()->deviceManager(), &DeviceManager::deviceStateChanged, this, &DeviceHandler::deviceStateChanged);
|
connect(GuhCore::instance()->deviceManager(), &DeviceManager::deviceStateChanged, this, &DeviceHandler::deviceStateChanged);
|
||||||
|
connect(GuhCore::instance()->deviceManager(), &DeviceManager::devicesDiscovered, this, &DeviceHandler::devicesDiscovered);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DeviceHandler::name() const
|
QString DeviceHandler::name() const
|
||||||
|
|||||||
@ -396,6 +396,12 @@ QPair<bool, QString> JsonTypes::validateVariant(const QVariant &templateVariant,
|
|||||||
qDebug() << "device not valid";
|
qDebug() << "device not valid";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
} else if (refName == deviceDescriptorRef()) {
|
||||||
|
QPair<bool, QString> result = validateMap(deviceDescriptorDescription(), variant.toMap());
|
||||||
|
if (!result.first) {
|
||||||
|
qDebug() << "devicedescription not valid";
|
||||||
|
return result;
|
||||||
|
}
|
||||||
} else if (refName == vendorRef()) {
|
} else if (refName == vendorRef()) {
|
||||||
QPair<bool, QString> result = validateMap(vendorDescription(), variant.toMap());
|
QPair<bool, QString> result = validateMap(vendorDescription(), variant.toMap());
|
||||||
if (!result.first) {
|
if (!result.first) {
|
||||||
|
|||||||
Reference in New Issue
Block a user