- filename = qvariant_converter.getString(self.pageContent.toolchainList.item(i).data(Qt.UserRole))
- self._validationProcess = QProcess()
- self._validationProcess.start(filename, ["-v"])
- self._validationProcess.waitForStarted(1000)
- if self._validationProcess.waitForFinished(200):
- description = str(self._validationProcess.readAllStandardError())
- infos = bertos_utils.getToolchainInfo(description)
- if len(infos.keys()) >= 4:
- self._validItem(i, infos)
+ filename = qvariant_converter.getStringDict(self.pageContent.toolchainList.item(i).data(Qt.UserRole))["path"]
+ valid = False
+ info = {}
+ ## Check for the other tools of the toolchain
+ for tool in TOOLCHAIN_ITEMS:
+ if os.path.exists(filename.replace("gcc", tool)):
+ valid = True
+ else:
+ valid = False
+ break
+ ## Try to retrieve the informations about the toolchain only for the valid toolchains
+ if valid:
+ self._validation_process = QProcess()
+ self._validation_process.start(filename, ["-v"])
+ self._validation_process.waitForStarted(1000)
+ if self._validation_process.waitForFinished(200):
+ description = str(self._validation_process.readAllStandardError())
+ info = bertos_utils.getToolchainInfo(description)
+ if len(info.keys()) >= 4:
+ valid = True