def __init__(self):
BWizardPage.__init__(self, UI_LOCATION + "/toolchain_select.ui")
self.setTitle(self.tr("Select toolchain"))
def __init__(self):
BWizardPage.__init__(self, UI_LOCATION + "/toolchain_select.ui")
self.setTitle(self.tr("Select toolchain"))
- sel_toolchain = QFileDialog.getOpenFileName(self, self.tr("Choose the toolchain"), "")
- if not sel_toolchain.isEmpty():
+ sel_toolchain = unicode(QFileDialog.getOpenFileName(self, self.tr("Choose the toolchain"), ""))
+ if sel_toolchain != "":
self.pageContent.toolchainList.addItem(item)
toolchains = self.toolchains()
toolchains[sel_toolchain] = False
self.pageContent.toolchainList.addItem(item)
toolchains = self.toolchains()
toolchains[sel_toolchain] = False
for i in range(self.pageContent.toolchainList.count()):
self.validateToolchain(i)
QApplication.instance().restoreOverrideCursor()
for i in range(self.pageContent.toolchainList.count()):
self.validateToolchain(i)
QApplication.instance().restoreOverrideCursor()
def _populateToolchainList(self):
"""
Fills the toolchain list with the toolchains stored in the QSettings.
def _populateToolchainList(self):
"""
Fills the toolchain list with the toolchains stored in the QSettings.
self.pageContent.toolchainList.addItem(item)
stored_toolchains[element] = False
self.setToolchains(stored_toolchains)
self.pageContent.toolchainList.addItem(item)
stored_toolchains[element] = False
self.setToolchains(stored_toolchains)
def _validItem(self, index, infos):
"""
Sets the item at index as a valid item and associates the given info to it.
def _validItem(self, index, infos):
"""
Sets the item at index as a valid item and associates the given info to it.
item.setIcon(QIcon(":/images/warning.png"))
if "version" in infos.keys() and "target" in infos.keys():
item.setText("GCC " + infos["version"] + " - " + infos["target"])
item.setIcon(QIcon(":/images/warning.png"))
if "version" in infos.keys() and "target" in infos.keys():
item.setText("GCC " + infos["version"] + " - " + infos["target"])
def _invalidItem(self, index):
"""
Sets the item at index as an invalid item.
"""
item = self.pageContent.toolchainList.item(index)
item.setIcon(QIcon(":/images/error.png"))
def _invalidItem(self, index):
"""
Sets the item at index as an invalid item.
"""
item = self.pageContent.toolchainList.item(index)
item.setIcon(QIcon(":/images/error.png"))
def validateToolchain(self, i):
"""
Toolchain validation procedure.
def validateToolchain(self, i):
"""
Toolchain validation procedure.