import bertos_utils
import qvariant_converter
+from const import *
+
class BCpuPage(BWizardPage):
def __init__(self):
def isComplete(self):
if self.pageContent.cpuList.currentRow() != -1:
- self._projectInfoStore("CPU_INFOS", qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole)))
+ 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:
+ infos[key] = qvariant_converter.getString(value)
+ self._projectInfoStore("CPU_INFOS", infos)
return True
else:
return False
newData.update(infos)
item.setData(Qt.UserRole, qvariant_converter.convertStringDict(newData))
needed = self._projectInfoRetrieve("CPU_INFOS")
- if infos["target"].find(qvariant_converter.getString(needed["TOOLCHAIN"])) != -1:
+ if infos["target"].find(needed["TOOLCHAIN"]) != -1:
item.setIcon(QIcon(":/images/ok.png"))
else:
item.setIcon(QIcon(":/images/warning.png"))