Commit 8cdc7f9f authored by Don Gagne's avatar Don Gagne

Fix Qml API

parent 671a465f
......@@ -99,6 +99,16 @@ void LinkManager::setToolbox(QGCToolbox *toolbox)
}
// This should only be used by Qml code
void LinkManager::createConnectedLink(LinkConfiguration* config)
{
for(int i = 0; i < _sharedConfigurations.count(); i++) {
SharedLinkConfigurationPointer& sharedConf = _sharedConfigurations[i];
if (sharedConf->name() == config->name())
createConnectedLink(sharedConf);
}
}
LinkInterface* LinkManager::createConnectedLink(SharedLinkConfigurationPointer& config)
{
if (!config) {
......
......@@ -124,7 +124,10 @@ public:
/// Creates, connects (and adds) a link based on the given configuration instance.
/// Link takes ownership of config.
Q_INVOKABLE LinkInterface* createConnectedLink(SharedLinkConfigurationPointer& config);
LinkInterface* createConnectedLink(SharedLinkConfigurationPointer& config);
// This should only be used by Qml code
Q_INVOKABLE void createConnectedLink(LinkConfiguration* config);
/// Creates, connects (and adds) a link based on the given configuration name.
LinkInterface* createConnectedLink(const QString& name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment