Skip to content
Snippets Groups Projects
Commit 8cdc7f9f authored by Don Gagne's avatar Don Gagne
Browse files

Fix Qml API

parent 671a465f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment