From: duplo Date: Tue, 13 Jan 2009 13:47:27 +0000 (+0000) Subject: Add the path in the toolchain description X-Git-Tag: 2.1.0~509 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=c286a80723fe79cede69bb8e08cb69b1ead2e375;p=bertos.git Add the path in the toolchain description git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2173 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BToolchainPage.py b/wizard/BToolchainPage.py index 8d4101ba..f76c70c1 100644 --- a/wizard/BToolchainPage.py +++ b/wizard/BToolchainPage.py @@ -34,7 +34,7 @@ class BToolchainPage(BWizardPage): toolchains = self.toolchains() for key, value in toolchains.items(): item = QListWidgetItem(key) - item.setData(Qt.UserRole, qvariant_converter.convertDict({"path": key})) + item.setData(Qt.UserRole, qvariant_converter.convertStringDict({"path": key})) self.pageContent.toolchainList.addItem(item) if value: self.validateToolchain(self.pageContent.toolchainList.row(item)) @@ -45,7 +45,7 @@ class BToolchainPage(BWizardPage): def _selectionChanged(self): infos = collections.defaultdict(lambda: unicode("not defined")) infos.update(qvariant_converter.getStringDict(self.pageContent.toolchainList.currentItem().data(Qt.UserRole))) - self.pageContent.infoLabel.setText("GCC " + infos["version"] + " (" + infos["build"] + ")\nTarget: " + infos["target"] + "\nThread model: " + infos["thread"]) + self.pageContent.infoLabel.setText("GCC " + infos["version"] + " (" + infos["build"] + ")\nTarget: " + infos["target"] + "\nPath: " + infos["path"]) self.pageContent.infoLabel.setVisible(True) self.emit(SIGNAL("completeChanged()")) @@ -58,7 +58,7 @@ class BToolchainPage(BWizardPage): for element in toolchainList: if not element in storedToolchains.keys(): item = QListWidgetItem(element) - item.setData(Qt.UserRole, qvariant_converter.convertDict({"path": element})) + item.setData(Qt.UserRole, qvariant_converter.convertStringDict({"path": element})) self.pageContent.toolchainList.addItem(item) storedToolchains[element] = False self.setToolchains(storedToolchains) @@ -72,9 +72,9 @@ class BToolchainPage(BWizardPage): def _validItem(self, index, infos): item = self.pageContent.toolchainList.item(index) - newData = qvariant_converter.getDict(self.pageContent.toolchainList.item(index).data(Qt.UserRole)) + newData = qvariant_converter.getStringDict(self.pageContent.toolchainList.item(index).data(Qt.UserRole)) newData.update(infos) - item.setData(Qt.UserRole, qvariant_converter.convertDict(newData)) + item.setData(Qt.UserRole, qvariant_converter.convertStringDict(newData)) needed = self._projectInfoRetrieve("CPU_INFOS") if infos["target"].find(qvariant_converter.getString(needed["TOOLCHAIN"])) != -1: item.setIcon(QIcon(":/images/ok.png")) @@ -99,7 +99,7 @@ class BToolchainPage(BWizardPage): def removeToolchain(self): if self.pageContent.toolchainList.currentRow() != -1: item = self.pageContent.toolchainList.takeItem(self.pageContent.toolchainList.currentRow()) - toolchain = qvariant_converter.getString(qvariant_converter.getDict(item.data(Qt.UserRole))["path"]) + toolchain = qvariant_converter.getString(qvariant_converter.getStringDict(item.data(Qt.UserRole))["path"]) toolchains = self.toolchains() del toolchains[toolchain] self.setToolchains(toolchains) @@ -114,7 +114,7 @@ class BToolchainPage(BWizardPage): self.validateToolchain(i) def validateToolchain(self, i): - filename = qvariant_converter.getString(qvariant_converter.getDict(self.pageContent.toolchainList.item(i).data(Qt.UserRole))["path"]) + filename = qvariant_converter.getStringDict(self.pageContent.toolchainList.item(i).data(Qt.UserRole))["path"] self._validationProcess = QProcess() self._validationProcess.start(filename, ["-v"]) self._validationProcess.waitForStarted(1000) @@ -135,8 +135,7 @@ class BToolchainPage(BWizardPage): def isComplete(self): if self.pageContent.toolchainList.currentRow() != -1: self._projectInfoStore("TOOLCHAIN", - qvariant_converter.getString( - qvariant_converter.getDict(self.pageContent.toolchainList.currentItem().data(Qt.UserRole))["path"])) + qvariant_converter.getStringDict(self.pageContent.toolchainList.currentItem().data(Qt.UserRole))["path"]) return True else: return False