Modify the timout of the validation process and the result rapresentation
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 8 Jan 2009 10:50:54 +0000 (10:50 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 8 Jan 2009 10:50:54 +0000 (10:50 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2136 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BToolchainPage.py

index 6c43ec10d403390a052062ab3f96ecd7e3ef905b..567fbcee11e0f3b2607b1a7ce1ef4651d66efc2e 100644 (file)
@@ -71,12 +71,11 @@ class BToolchainPage(BWizardPage):
     def _validItem(self, index, infos):
         item = self.pageContent.toolchainList.item(index)
         needed = self._projectInfoRetrieve("CPU_INFOS")
-        if infos["target"].find(unicode(needed[QString("TOOLCHAIN")])) != -1:
+        if infos["target"].find(unicode(needed[QString("TOOLCHAIN")].toString())) != -1:
             item.setIcon(QIcon(":/images/ok.png"))
         else:
             item.setIcon(QIcon(":/images/warning.png"))
-        item.setToolTip("Version: " + infos["version"] + "<br>Target: " + infos["target"] +
-            "<br>Thread model: " + infos["thread"])
+        item.setText(infos["version"] + " " + infos["target"])
     
     def _invalidItem(self, index):
         item = self.pageContent.toolchainList.item(index)
@@ -108,11 +107,11 @@ class BToolchainPage(BWizardPage):
     
     def validateToolchains(self):
         for i in range(self.pageContent.toolchainList.count()):
-            filename = self.pageContent.toolchainList.item(i).text()
+            filename = unicode(self.pageContent.toolchainList.item(i).data(Qt.UserRole).toString())
             self._validationProcess = QProcess()
             self._validationProcess.start(filename, ["-v"])
-            self._validationProcess.waitForStarted(10)
-            if self._validationProcess.waitForFinished(20):
+            self._validationProcess.waitForStarted(1000)
+            if self._validationProcess.waitForFinished(200):
                 description = str(self._validationProcess.readAllStandardError())
                 infos = bertos_utils.getToolchainInfo(description)
                 if len(infos.keys()) == 4: