cleanup fixes
This commit is contained in:
parent
0b7176c6f4
commit
b4ae1919ba
@ -1052,6 +1052,7 @@ void DeviceManagerImplementation::loadPlugin(DevicePlugin *pluginIface, const Pl
|
|||||||
connect(pluginIface, &DevicePlugin::browseRequestFinished, this, &DeviceManagerImplementation::browseRequestFinished);
|
connect(pluginIface, &DevicePlugin::browseRequestFinished, this, &DeviceManagerImplementation::browseRequestFinished);
|
||||||
connect(pluginIface, &DevicePlugin::browserItemRequestFinished, this, &DeviceManagerImplementation::browserItemRequestFinished);
|
connect(pluginIface, &DevicePlugin::browserItemRequestFinished, this, &DeviceManagerImplementation::browserItemRequestFinished);
|
||||||
connect(pluginIface, &DevicePlugin::browserItemExecutionFinished, this, &DeviceManagerImplementation::browserItemExecutionFinished);
|
connect(pluginIface, &DevicePlugin::browserItemExecutionFinished, this, &DeviceManagerImplementation::browserItemExecutionFinished);
|
||||||
|
connect(pluginIface, &DevicePlugin::browserItemActionExecutionFinished, this, &DeviceManagerImplementation::browserItemActionExecutionFinished);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,6 +1109,12 @@ void DeviceManagerImplementation::loadConfiguredDevices()
|
|||||||
params.append(Param(ParamTypeId(paramTypeIdString), settings.value(paramTypeIdString)));
|
params.append(Param(ParamTypeId(paramTypeIdString), settings.value(paramTypeIdString)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Make sure all params are around. if they aren't initialize with default values
|
||||||
|
foreach (const ParamType ¶mType, deviceClass.paramTypes()) {
|
||||||
|
if (!params.hasParam(paramType.id())) {
|
||||||
|
params.append(Param(paramType.id(), paramType.defaultValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
device->setParams(params);
|
device->setParams(params);
|
||||||
settings.endGroup(); // Params
|
settings.endGroup(); // Params
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,7 @@ ActionHandler::ActionHandler(QObject *parent) :
|
|||||||
|
|
||||||
connect(NymeaCore::instance(), &NymeaCore::actionExecuted, this, &ActionHandler::actionExecuted);
|
connect(NymeaCore::instance(), &NymeaCore::actionExecuted, this, &ActionHandler::actionExecuted);
|
||||||
connect(NymeaCore::instance(), &NymeaCore::browserItemExecuted, this, &ActionHandler::browserItemExecuted);
|
connect(NymeaCore::instance(), &NymeaCore::browserItemExecuted, this, &ActionHandler::browserItemExecuted);
|
||||||
|
connect(NymeaCore::instance(), &NymeaCore::browserItemActionExecuted, this, &ActionHandler::browserItemActionExecuted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns the name of the \l{ActionHandler}. In this case \b Actions.*/
|
/*! Returns the name of the \l{ActionHandler}. In this case \b Actions.*/
|
||||||
|
|||||||
@ -717,9 +717,9 @@ JsonReply *DeviceHandler::GetBrowserItem(const QVariantMap ¶ms) const
|
|||||||
|
|
||||||
if (result.status == Device::DeviceErrorAsync ) {
|
if (result.status == Device::DeviceErrorAsync ) {
|
||||||
JsonReply *reply = createAsyncReply("GetBrowserItem");
|
JsonReply *reply = createAsyncReply("GetBrowserItem");
|
||||||
m_asyncBrowseRequests.insert(result.id(), reply);
|
m_asyncBrowseDetailsRequests.insert(result.id(), reply);
|
||||||
connect(reply, &JsonReply::finished, this, [this, result](){
|
connect(reply, &JsonReply::finished, this, [this, result](){
|
||||||
m_asyncBrowseRequests.remove(result.id());
|
m_asyncBrowseDetailsRequests.remove(result.id());
|
||||||
});
|
});
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
@ -873,8 +873,8 @@ void DeviceHandler::browseRequestFinished(const Device::BrowseResult &result)
|
|||||||
|
|
||||||
void DeviceHandler::browserItemRequestFinished(const Device::BrowserItemResult &result)
|
void DeviceHandler::browserItemRequestFinished(const Device::BrowserItemResult &result)
|
||||||
{
|
{
|
||||||
if (m_asyncBrowseDetailsRequests.contains(result.id())) {
|
if (!m_asyncBrowseDetailsRequests.contains(result.id())) {
|
||||||
qCWarning(dcJsonRpc()) << "No pending JsonRpc reply. Did it time out?";
|
qCWarning(dcJsonRpc()) << "No pending JsonRpc reply for result" << result.id() << ". Did it time out?";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JsonReply *reply = m_asyncBrowseDetailsRequests.take(result.id());
|
JsonReply *reply = m_asyncBrowseDetailsRequests.take(result.id());
|
||||||
|
|||||||
@ -202,6 +202,7 @@ void NymeaCore::init() {
|
|||||||
connect(m_deviceManager, &DeviceManagerImplementation::deviceDisappeared, this, &NymeaCore::onDeviceDisappeared);
|
connect(m_deviceManager, &DeviceManagerImplementation::deviceDisappeared, this, &NymeaCore::onDeviceDisappeared);
|
||||||
connect(m_deviceManager, &DeviceManagerImplementation::actionExecutionFinished, this, &NymeaCore::actionExecutionFinished);
|
connect(m_deviceManager, &DeviceManagerImplementation::actionExecutionFinished, this, &NymeaCore::actionExecutionFinished);
|
||||||
connect(m_deviceManager, &DeviceManagerImplementation::browserItemExecutionFinished, this, &NymeaCore::browserItemExecutionFinished);
|
connect(m_deviceManager, &DeviceManagerImplementation::browserItemExecutionFinished, this, &NymeaCore::browserItemExecutionFinished);
|
||||||
|
connect(m_deviceManager, &DeviceManagerImplementation::browserItemActionExecutionFinished, this, &NymeaCore::browserItemActionExecutionFinished);
|
||||||
connect(m_deviceManager, &DeviceManagerImplementation::devicesDiscovered, this, &NymeaCore::devicesDiscovered);
|
connect(m_deviceManager, &DeviceManagerImplementation::devicesDiscovered, this, &NymeaCore::devicesDiscovered);
|
||||||
connect(m_deviceManager, &DeviceManagerImplementation::deviceSetupFinished, this, &NymeaCore::deviceSetupFinished);
|
connect(m_deviceManager, &DeviceManagerImplementation::deviceSetupFinished, this, &NymeaCore::deviceSetupFinished);
|
||||||
connect(m_deviceManager, &DeviceManagerImplementation::deviceReconfigurationFinished, this, &NymeaCore::deviceReconfigurationFinished);
|
connect(m_deviceManager, &DeviceManagerImplementation::deviceReconfigurationFinished, this, &NymeaCore::deviceReconfigurationFinished);
|
||||||
|
|||||||
Reference in New Issue
Block a user