14 pass |
14 pass |
15 |
15 |
16 import os |
16 import os |
17 import copy |
17 import copy |
18 |
18 |
19 from PyQt4.QtCore import pyqtSlot, QProcess, SIGNAL |
19 from PyQt5.QtCore import pyqtSlot, QProcess |
20 from PyQt4.QtGui import QDialog |
20 from PyQt5.QtWidgets import QDialog |
21 |
21 |
22 from E5Gui.E5Application import e5App |
22 from E5Gui.E5Application import e5App |
23 from E5Gui import E5FileDialog, E5MessageBox |
23 from E5Gui import E5FileDialog, E5MessageBox |
24 from E5Gui.E5Completers import E5FileCompleter |
24 from E5Gui.E5Completers import E5FileCompleter |
25 |
25 |
244 startWith = self.configfileEdit.text() |
244 startWith = self.configfileEdit.text() |
245 if startWith == "": |
245 if startWith == "": |
246 startWith = self.ppath |
246 startWith = self.ppath |
247 config = E5FileDialog.getOpenFileName( |
247 config = E5FileDialog.getOpenFileName( |
248 self, |
248 self, |
249 self.trUtf8("Select configuration file"), |
249 self.tr("Select configuration file"), |
250 startWith, |
250 startWith, |
251 self.trUtf8("Configuration Files (*.cfg *.cnf *.rc);;" |
251 self.tr("Configuration Files (*.cfg *.cnf *.rc);;" |
252 "All Files (*)")) |
252 "All Files (*)")) |
253 if config: |
253 if config: |
254 self.configfileEdit.setText(Utilities.toNativeSeparators(config)) |
254 self.configfileEdit.setText(Utilities.toNativeSeparators(config)) |
255 |
255 |
256 @pyqtSlot() |
256 @pyqtSlot() |
260 |
260 |
261 It displays a file selection dialog to select the report file. |
261 It displays a file selection dialog to select the report file. |
262 """ |
262 """ |
263 report = E5FileDialog.getSaveFileName( |
263 report = E5FileDialog.getSaveFileName( |
264 self, |
264 self, |
265 self.trUtf8("Select report file"), |
265 self.tr("Select report file"), |
266 self.reportfileEdit.text(), |
266 self.reportfileEdit.text(), |
267 None, |
267 None, |
268 None, |
268 None, |
269 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
269 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
270 |
270 |
339 if procStarted: |
339 if procStarted: |
340 e5App().getObject("ViewManager").enableEditorsCheckFocusIn(False) |
340 e5App().getObject("ViewManager").enableEditorsCheckFocusIn(False) |
341 else: |
341 else: |
342 E5MessageBox.critical( |
342 E5MessageBox.critical( |
343 self, |
343 self, |
344 self.trUtf8('Process Generation Error'), |
344 self.tr('Process Generation Error'), |
345 self.trUtf8( |
345 self.tr( |
346 'Could not start {0}.<br>' |
346 'Could not start {0}.<br>' |
347 'Ensure that it is in the search path.' |
347 'Ensure that it is in the search path.' |
348 ).format(self.lint)) |
348 ).format(self.lint)) |
349 |
349 |
350 def __createConfigDone(self, exitCode, exitStatus): |
350 def __createConfigDone(self, exitCode, exitStatus): |
386 return |
386 return |
387 self.pylintProc.setReadChannel(QProcess.StandardError) |
387 self.pylintProc.setReadChannel(QProcess.StandardError) |
388 while self.pylintProc and self.pylintProc.canReadLine(): |
388 while self.pylintProc and self.pylintProc.canReadLine(): |
389 s = 'pylint: ' + str( |
389 s = 'pylint: ' + str( |
390 self.pylintProc.readLine(), self.__ioEncoding, "replace") |
390 self.pylintProc.readLine(), self.__ioEncoding, "replace") |
391 e5App().getObject("UserInterface").emit(SIGNAL('appendStderr'), s) |
391 e5App().getObject("UserInterface").appendStderr.emit(s) |