- toolchains = self.toolchains()
- if os.name == "nt":
- import winreg_importer
- stored_toolchains = winreg_importer.getBertosToolchains()
- for toolchain in stored_toolchains:
- toolchains[toolchain] = True
+ self.pageContent.toolchainList.clear()
+ self._valid_items = []
+ toolchains = self._toolchain_manager.predefined_toolchains + self._toolchain_manager.toolchains
+ toolchain_dict = {
+ 'valid': [],
+ 'non-valid': [],
+ 'unknown': [],
+ 'unverified': [],
+ }
+ for key, value in toolchains:
+ if os.path.exists(key):
+ item_data = {"path":key}
+ if value:
+ item_data.update(value)
+ if value is not None:
+ k, data = self.validateToolchain(key)
+ item_data.update(data)
+ toolchain_dict[k].append(item_data)
+ else:
+ toolchain_dict["unverified"].append(item_data)
+ self._processItems(toolchain_dict["valid"], self._validItem)
+ self._processItems(toolchain_dict["non-valid"], self._invalidItem)
+ self._processItems(toolchain_dict["unknown"], self._unknownItem)
+ self._processItems(toolchain_dict["unverified"])
+
+ def _processItems(self, item_list, procedure=lambda x: None):