ProjectPyramid/DistributionTypeSelectionDialog.py

changeset 74
11587ae1122f
parent 71
8a78fab32c18
child 80
b39b70d147a9
equal deleted inserted replaced
72:3b3e73b730f0 74:11587ae1122f
11 try: 11 try:
12 str = unicode 12 str = unicode
13 except NameError: 13 except NameError:
14 pass 14 pass
15 15
16 from PyQt4.QtCore import Qt, QProcess 16 from PyQt5.QtCore import Qt, QProcess
17 from PyQt4.QtGui import QDialog, QListWidgetItem 17 from PyQt5.QtWidgets import QDialog, QListWidgetItem
18 18
19 from E5Gui import E5MessageBox 19 from E5Gui import E5MessageBox
20 20
21 from .Ui_DistributionTypeSelectionDialog import \ 21 from .Ui_DistributionTypeSelectionDialog import \
22 Ui_DistributionTypeSelectionDialog 22 Ui_DistributionTypeSelectionDialog
58 str(proc.readAllStandardOutput(), 58 str(proc.readAllStandardOutput(),
59 Preferences.getSystem("IOEncoding"), 59 Preferences.getSystem("IOEncoding"),
60 'replace') 60 'replace')
61 else: 61 else:
62 if not finished: 62 if not finished:
63 errMsg = self.trUtf8( 63 errMsg = self.tr(
64 "The python setup.py command did not finish within" 64 "The python setup.py command did not finish within"
65 " 30s.") 65 " 30s.")
66 else: 66 else:
67 errMsg = self.trUtf8("Could not start the pcreate executable.") 67 errMsg = self.tr("Could not start the pcreate executable.")
68 if not errMsg: 68 if not errMsg:
69 for line in output.splitlines(): 69 for line in output.splitlines():
70 line = line.strip() 70 line = line.strip()
71 if line.startswith("--formats="): 71 if line.startswith("--formats="):
72 format, description = line.replace("--formats=", "")\ 72 format, description = line.replace("--formats=", "")\
77 itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) 77 itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable)
78 itm.setCheckState(Qt.Unchecked) 78 itm.setCheckState(Qt.Unchecked)
79 else: 79 else:
80 E5MessageBox.critical( 80 E5MessageBox.critical(
81 None, 81 None,
82 self.trUtf8('Process Generation Error'), 82 self.tr('Process Generation Error'),
83 errMsg) 83 errMsg)
84 84
85 def getFormats(self): 85 def getFormats(self):
86 """ 86 """
87 Public method to retrieve the checked formats. 87 Public method to retrieve the checked formats.

eric ide

mercurial