Call plugin init method after plugin configuration loading
This commit is contained in:
parent
156ff84888
commit
4a0da12be9
@ -1117,6 +1117,9 @@ void DeviceManager::loadPlugin(DevicePlugin *pluginIface)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call the init method of the plugin
|
||||||
|
pluginIface->init();
|
||||||
|
|
||||||
m_devicePlugins.insert(pluginIface->pluginId(), pluginIface);
|
m_devicePlugins.insert(pluginIface->pluginId(), pluginIface);
|
||||||
|
|
||||||
connect(pluginIface, &DevicePlugin::emitEvent, this, &DeviceManager::eventTriggered);
|
connect(pluginIface, &DevicePlugin::emitEvent, this, &DeviceManager::eventTriggered);
|
||||||
|
|||||||
@ -285,14 +285,12 @@ QList<ParamType> DevicePlugin::configurationDescription() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! This will be called when the DeviceManager initializes the plugin and set up the things behind the scenes.
|
/*! This will be called when the DeviceManager initializes the plugin and set up the things behind the scenes.
|
||||||
When implementing a new plugin, use \l{DevicePlugin::init()} instead in order to do initialisation work. */
|
When implementing a new plugin, use \l{DevicePlugin::init()} instead in order to do initialisation work.
|
||||||
|
The \l{DevicePlugin::init()} method will be called once the plugin configuration has been loaded. */
|
||||||
void DevicePlugin::initPlugin(DeviceManager *deviceManager)
|
void DevicePlugin::initPlugin(DeviceManager *deviceManager)
|
||||||
{
|
{
|
||||||
m_deviceManager = deviceManager;
|
m_deviceManager = deviceManager;
|
||||||
|
|
||||||
loadMetaData();
|
loadMetaData();
|
||||||
|
|
||||||
init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<bool, QList<ParamType> > DevicePlugin::parseParamTypes(const QJsonArray &array) const
|
QPair<bool, QList<ParamType> > DevicePlugin::parseParamTypes(const QJsonArray &array) const
|
||||||
|
|||||||
Reference in New Issue
Block a user