From e4faa12ff38fb20e13c34527410cc267a88e16dc Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 30 Jan 2009 16:35:52 +0000 Subject: [PATCH] Modify the rapresentation of the cpu infos in the project git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2245 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BCpuPage.py | 10 +++++++++- wizard/BToolchainPage.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 2d616d53..8323b128 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -14,6 +14,8 @@ from BWizardPage import * import bertos_utils import qvariant_converter +from const import * + class BCpuPage(BWizardPage): def __init__(self): @@ -54,7 +56,13 @@ class BCpuPage(BWizardPage): 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 diff --git a/wizard/BToolchainPage.py b/wizard/BToolchainPage.py index 392217ef..16cfe7c2 100644 --- a/wizard/BToolchainPage.py +++ b/wizard/BToolchainPage.py @@ -76,7 +76,7 @@ class BToolchainPage(BWizardPage): 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")) -- 2.25.1