# HG changeset patch # User Lucas Thompson # Date 1486726229 0 # Node ID f1c4ca3ccaa3437a89762db3a76dc339d0668ee6 # Parent d9511f9e04d74c7a6d43871ec62d62416d77bb72 Change setDesiredExtractor signature to take ServerDescription aggregate. diff -r d9511f9e04d7 -r f1c4ca3ccaa3 plugin/PiperVampPluginFactory.cpp --- a/plugin/PiperVampPluginFactory.cpp Fri Feb 10 11:15:19 2017 +0000 +++ b/plugin/PiperVampPluginFactory.cpp Fri Feb 10 11:30:29 2017 +0000 @@ -64,7 +64,7 @@ for (auto platformHelper: hep.getHelperExecutables(QString::fromStdString(server.name))) m_servers.push_back(platformHelper); if (server.hasDesiredExtractors) { - setDesiredExtractors(server.name, server.extractors); + setDesiredExtractors(server); } } @@ -92,17 +92,16 @@ } void -PiperVampPluginFactory::setDesiredExtractors(ServerName name, - DesiredExtractors extractors) +PiperVampPluginFactory::setDesiredExtractors(ServerDescription description) { const bool isValidServerName = std::find_if( m_servers.begin(), m_servers.end(), - [&name](const HelperExecPath::HelperExec &h) -> bool { - return QFileInfo(h.executable).fileName().toStdString() == name; + [&description](const HelperExecPath::HelperExec &h) -> bool { + return QFileInfo(h.executable).fileName().toStdString() == description.name; }) != m_servers.end(); - if ( isValidServerName ) { - m_overrideDesiredExtractors[name] = extractors; + if ( isValidServerName && description.hasDesiredExtractors ) { + m_overrideDesiredExtractors[description.name] = description.extractors; } } diff -r d9511f9e04d7 -r f1c4ca3ccaa3 plugin/PiperVampPluginFactory.h --- a/plugin/PiperVampPluginFactory.h Fri Feb 10 11:15:19 2017 +0000 +++ b/plugin/PiperVampPluginFactory.h Fri Feb 10 11:30:29 2017 +0000 @@ -61,7 +61,7 @@ PiperVampPluginFactory(); PiperVampPluginFactory(std::initializer_list servers); - virtual void setDesiredExtractors(ServerName name, DesiredExtractors extractors); + virtual void setDesiredExtractors(ServerDescription description); virtual ~PiperVampPluginFactory();