18 QTreeWidgetItem, |
18 QTreeWidgetItem, |
19 QApplication, |
19 QApplication, |
20 QHeaderView, |
20 QHeaderView, |
21 ) |
21 ) |
22 |
22 |
23 from EricWidgets.EricApplication import ericApp |
23 from eric7.EricWidgets.EricApplication import ericApp |
24 |
24 |
25 from .Ui_SyntaxCheckerDialog import Ui_SyntaxCheckerDialog |
25 from .Ui_SyntaxCheckerDialog import Ui_SyntaxCheckerDialog |
26 |
26 |
27 import Utilities |
27 from eric7 import Utilities |
28 import UI.PixmapCache |
28 from eric7.EricGui import EricPixmapCache |
29 |
29 |
30 |
30 |
31 class SyntaxCheckerDialog(QDialog, Ui_SyntaxCheckerDialog): |
31 class SyntaxCheckerDialog(QDialog, Ui_SyntaxCheckerDialog): |
32 """ |
32 """ |
33 Class implementing a dialog to display the results of a syntax check run. |
33 Class implementing a dialog to display the results of a syntax check run. |
137 self.__lastFileItem.setExpanded(True) |
137 self.__lastFileItem.setExpanded(True) |
138 self.__lastFileItem.setData(0, self.filenameRole, filename) |
138 self.__lastFileItem.setData(0, self.filenameRole, filename) |
139 |
139 |
140 itm = QTreeWidgetItem(self.__lastFileItem) |
140 itm = QTreeWidgetItem(self.__lastFileItem) |
141 if isWarning: |
141 if isWarning: |
142 itm.setIcon(0, UI.PixmapCache.getIcon("warning")) |
142 itm.setIcon(0, EricPixmapCache.getIcon("warning")) |
143 else: |
143 else: |
144 itm.setIcon(0, UI.PixmapCache.getIcon("syntaxError")) |
144 itm.setIcon(0, EricPixmapCache.getIcon("syntaxError")) |
145 itm.setData(0, Qt.ItemDataRole.DisplayRole, line) |
145 itm.setData(0, Qt.ItemDataRole.DisplayRole, line) |
146 itm.setData(1, Qt.ItemDataRole.DisplayRole, error) |
146 itm.setData(1, Qt.ItemDataRole.DisplayRole, error) |
147 itm.setData(2, Qt.ItemDataRole.DisplayRole, sourcecode) |
147 itm.setData(2, Qt.ItemDataRole.DisplayRole, sourcecode) |
148 itm.setData(0, self.filenameRole, filename) |
148 itm.setData(0, self.filenameRole, filename) |
149 itm.setData(0, self.lineRole, int(line)) |
149 itm.setData(0, self.lineRole, int(line)) |