8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import QTimer, QProcess, Qt, pyqtSlot |
12 from PyQt4.QtCore import QTimer, QProcess, Qt, pyqtSlot |
13 from PyQt4.QtGui import QWidget, QMessageBox, QCursor, QHeaderView, QApplication, \ |
13 from PyQt4.QtGui import QWidget, QCursor, QHeaderView, QApplication, \ |
14 QTextCursor, QDialogButtonBox, QTreeWidgetItem, QFileDialog |
14 QTextCursor, QDialogButtonBox, QTreeWidgetItem |
15 |
15 |
16 from E5Gui import E5MessageBox, E5FileDialog |
16 from E5Gui import E5MessageBox, E5FileDialog |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 |
18 |
19 from .Ui_PyLintExecDialog import Ui_PyLintExecDialog |
19 from .Ui_PyLintExecDialog import Ui_PyLintExecDialog |
351 res = E5MessageBox.warning(self, |
351 res = E5MessageBox.warning(self, |
352 self.trUtf8("PyLint Report"), |
352 self.trUtf8("PyLint Report"), |
353 self.trUtf8( |
353 self.trUtf8( |
354 """<p>The PyLint report file <b>{0}</b> already exists.</p>""")\ |
354 """<p>The PyLint report file <b>{0}</b> already exists.</p>""")\ |
355 .format(self.reportFile), |
355 .format(self.reportFile), |
356 QMessageBox.StandardButtons( |
356 E5MessageBox.StandardButtons( |
357 QMessageBox.Cancel | \ |
357 E5MessageBox.Cancel | \ |
358 QMessageBox.Ignore), |
358 E5MessageBox.Ignore), |
359 QMessageBox.Cancel) |
359 E5MessageBox.Cancel) |
360 if res == QMessageBox.Cancel: |
360 if res == E5MessageBox.Cancel: |
361 return |
361 return |
362 |
362 |
363 try: |
363 try: |
364 f = open(self.reportFile, 'w') |
364 f = open(self.reportFile, 'w') |
365 f.write(self.buf) |
365 f.write(self.buf) |