X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBCpuPage.py;h=8ebaf4125fb2a496e574901c40d2d7924b3630c7;hb=83fc7933f968173822ed3f636d75860d4a747e76;hp=6264b7b378d4b66605541c18aed4a407067fd56c;hpb=df3bd7f742da8c015304fa21e01eb966ff76a089;p=bertos.git diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 6264b7b3..8ebaf412 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -61,16 +61,21 @@ class BCpuPage(BWizardPage): self.pageContent.frequencySpinBox.setVisible(True) infos = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole)) for key, value in infos.items(): - if type(CPU_DEF[key]) == list: - infos[key] = qvariant_converter.getStringList(value) - if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode: + if key in CPU_DEF: + if type(CPU_DEF[key]) == list: + infos[key] = qvariant_converter.getStringList(value) + if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode: + infos[key] = qvariant_converter.getString(value) + elif key.startswith(MK_PARAM_ID): infos[key] = qvariant_converter.getString(value) + else: + del infos[key] self.setProjectInfo("CPU_INFOS", infos) self.setProjectInfo("CPU_NAME", unicode(self.pageContent.cpuList.currentItem().text())) self.setProjectInfo("SELECTED_FREQ", unicode(long(self.pageContent.frequencySpinBox.value()))) tag_dict = self.projectInfo("ALL_CPU_TAGS") for tag in tag_dict: - if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["CORE_CPU"], infos["TOOLCHAIN"]]: + if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["TOOLCHAIN"]]: tag_dict[tag] = True else: tag_dict[tag] = False @@ -174,4 +179,4 @@ class BCpuPage(BWizardPage): self.pageContent.cpuList.setCurrentItem(elements[0]) def setFrequency(self, frequency): - self.pageContent.frequencySpinBox.setValue(long(frequency)) \ No newline at end of file + self.pageContent.frequencySpinBox.setValue(long(frequency))