Use a list of supported internal modules rather than a module by module test

This commit is contained in:
Raphael Coeffic
2022-01-02 13:05:09 +01:00
committed by Raphael Coeffic
parent a719b2429f
commit 1c823120e4
3 changed files with 84 additions and 6 deletions
+3 -2
View File
@@ -407,8 +407,9 @@ AbstractStaticItemModel * ModuleData::internalModuleItemModel()
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName("moduledata.internalmodule");
for (int i = 0; i < MODULE_TYPE_COUNT; i++) {
mdl->appendToItemList(typeToString(i), i, isInternalModuleAvailable(i));
auto modules = Boards::getSupportedInternalModules(getCurrentBoard());
for(auto mod : modules) {
mdl->appendToItemList(typeToString(mod), mod);
}
mdl->loadItemList();