X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBToolchainPage.py;h=8a1edc1e43ddc8d0f9aa4bd9d6789868ae3bb87d;hb=947fa269915f08922989a0faf971c216594ababf;hp=100abb5666488b290da0f2e3c8d3085f21e0ace5;hpb=28200763bd0b90237ce7bc2133857f5e3148c044;p=bertos.git diff --git a/wizard/BToolchainPage.py b/wizard/BToolchainPage.py index 100abb56..8a1edc1e 100644 --- a/wizard/BToolchainPage.py +++ b/wizard/BToolchainPage.py @@ -45,7 +45,7 @@ class BToolchainPage(BWizardPage): self.pageContent.toolchainList.clear() def _selectionChanged(self): - if self.pageContent.toolchainList.currentIndex != -1: + if self.pageContent.toolchainList.currentRow() != -1: 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"] + "\nPath: " + os.path.normpath(infos["path"])) @@ -83,7 +83,8 @@ class BToolchainPage(BWizardPage): item.setIcon(QIcon(":/images/ok.png")) else: item.setIcon(QIcon(":/images/warning.png")) - item.setText("GCC " + infos["version"] + " - " + infos["target"]) + if "version" in infos.keys() and "target" in infos.keys(): + item.setText("GCC " + infos["version"] + " - " + infos["target"]) def _invalidItem(self, index): item = self.pageContent.toolchainList.item(index) @@ -113,8 +114,10 @@ class BToolchainPage(BWizardPage): search.exec_() def validateAllToolchains(self): + QApplication.instance().setOverrideCursor(Qt.WaitCursor) for i in range(self.pageContent.toolchainList.count()): self.validateToolchain(i) + QApplication.instance().restoreOverrideCursor() def validateToolchain(self, i): filename = qvariant_converter.getStringDict(self.pageContent.toolchainList.item(i).data(Qt.UserRole))["path"]