11 try: |
11 try: |
12 str = unicode # __IGNORE_WARNING__ |
12 str = unicode # __IGNORE_WARNING__ |
13 except NameError: |
13 except NameError: |
14 pass |
14 pass |
15 |
15 |
16 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo |
16 from PyQt5.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo |
17 from PyQt4.QtGui import QDialog, QDialogButtonBox, QAbstractButton, QTextEdit |
17 from PyQt5.QtWidgets import (QDialog, QDialogButtonBox, QAbstractButton, |
|
18 QTextEdit) |
18 |
19 |
19 from E5Gui import E5MessageBox, E5FileDialog |
20 from E5Gui import E5MessageBox, E5FileDialog |
20 |
21 |
21 from .Ui_DjangoDialog import Ui_DjangoDialog |
22 from .Ui_DjangoDialog import Ui_DjangoDialog |
22 |
23 |
176 procStarted = self.proc.waitForStarted() |
177 procStarted = self.proc.waitForStarted() |
177 if not procStarted: |
178 if not procStarted: |
178 self.buttonBox.setFocus() |
179 self.buttonBox.setFocus() |
179 E5MessageBox.critical( |
180 E5MessageBox.critical( |
180 self, |
181 self, |
181 self.trUtf8('Process Generation Error'), |
182 self.tr('Process Generation Error'), |
182 self.trUtf8( |
183 self.tr( |
183 'The process {0} could not be started. ' |
184 'The process {0} could not be started. ' |
184 'Ensure, that it is in the search path.' |
185 'Ensure, that it is in the search path.' |
185 ).format(prog)) |
186 ).format(prog)) |
186 return procStarted |
187 return procStarted |
187 |
188 |
281 f.write(txt) |
282 f.write(txt) |
282 f.close() |
283 f.close() |
283 except IOError as err: |
284 except IOError as err: |
284 E5MessageBox.critical( |
285 E5MessageBox.critical( |
285 self, |
286 self, |
286 self.trUtf8("Error saving data"), |
287 self.tr("Error saving data"), |
287 self.trUtf8("""<p>The data could not be written""" |
288 self.tr("""<p>The data could not be written""" |
288 """ to <b>{0}</b></p><p>Reason: {1}</p>""") |
289 """ to <b>{0}</b></p><p>Reason: {1}</p>""") |
289 .format(fname, str(err))) |
290 .format(fname, str(err))) |