def nextId(self): """ Overload of the QWizardPage nextId method. """ # Route to Toolchain page if the user select advanced # or to Output page if the user select base if self.advanced: return self.wizard().pageIndex(BToolchainPage) else: cpu_info = self.projectInfo("CPU_INFOS") if cpu_info: target = cpu_info["TOOLCHAIN"] # Try to find a suitable toolchain automatically tm = ToolchainManager() suitable_toolchains = tm.suitableToolchains(target) if len(suitable_toolchains) == 1: toolchain = suitable_toolchains.pop() toolchain_info = tm._validateToolchain(toolchain) toolchain_info["path"] = toolchain self.setProjectInfo("TOOLCHAIN", toolchain_info) return self.wizard().pageIndex(BCreationPage) else: return self.wizard().pageIndex(BToolchainPage) else: # It seems that the nextId method is called before the # reloadData one (that is called after the page changing. # # TODO: fix this awful code lines target = None return self.wizard().pageIndex(BToolchainPage)
def __init__(self): BWizardPage.__init__(self, UI_LOCATION + "/toolchain_select.ui") self.setTitle(self.tr("Select toolchain")) self.setSubTitle(self.tr("You can look for more toolchains in your system by pressing the \"Search\" button, or manually add them with the \"+\" button")) self._valid_items = [] self._toolchain_manager = ToolchainManager()