+ def addToolchain(self):
+ sel_toolchain = QFileDialog.getOpenFileName(self, self.tr("Choose the toolchain"), "")
+ item = QListWidgetItem(sel_toolchain)
+ item.setData(Qt.UserRole, QVariant(sel_toolchain))
+ self.pageContent.toolchainList.addItem(item)
+ toolchains = self._settingsRetrieve("toolchains").toList()
+ toolchains = set([toolchain.toString() for toolchain in toolchains] + [sel_toolchain])
+ self._settingsStore("toolchains", list(toolchains))
+
+ def removeToolchain(self):
+ if self.pageContent.toolchainList.currentRow() != -1:
+ item = self.pageContent.toolchainList.takeItem(self.pageContent.toolchainList.currentRow())
+ item = item.data(Qt.UserRole).toString()
+ toolchains = self._settingsRetrieve("toolchains").toList()
+ toolchains = [toolchain.toString() for toolchain in toolchains]
+ toolchains.remove(unicode(item))
+ self._settingsStore("toolchains", toolchains)
+