Skip to content

Commit

Permalink
Replace getModuleComponentList by listClassesFromTarget in PluginManager
Browse files Browse the repository at this point in the history
  • Loading branch information
hugtalbot committed Jan 26, 2025
1 parent 3804579 commit e5041a1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Sofa/GUI/Qt/src/sofa/gui/qt/SofaPluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,19 +260,11 @@ void SofaPluginManager::updateComponentList()
return;
}

const char* pluginNameStr = plugin->getModuleName();
std::string componentListStr{};
const char* tempComponentList = plugin->getModuleComponentList();

// the plugin does not implement getModuleComponentList(), or returns nothing.
if (tempComponentList == nullptr)
{
const char* pluginNameStr = plugin->getModuleName();
componentListStr = sofa::core::ObjectFactory::getInstance()->listClassesFromTarget(pluginNameStr);
}
else
{
componentListStr = tempComponentList;
}
// Get component list from ObjectFactory
componentListStr = sofa::core::ObjectFactory::getInstance()->listClassesFromTarget(pluginNameStr);

QString cpts(componentListStr.data());
cpts.replace(", ","\n");
Expand Down

0 comments on commit e5041a1

Please sign in to comment.