50 message = _messages[code] |
50 message = _messages[code] |
51 else: |
51 else: |
52 continue |
52 continue |
53 itm = QTreeWidgetItem(self.codeTable, [code, message]) |
53 itm = QTreeWidgetItem(self.codeTable, [code, message]) |
54 if code.startswith(("W", "C", "M")): |
54 if code.startswith(("W", "C", "M")): |
55 itm.setIcon(0, UI.PixmapCache.getIcon("warning.png")) |
55 itm.setIcon(0, UI.PixmapCache.getIcon("warning")) |
56 elif code.startswith("E"): |
56 elif code.startswith("E"): |
57 itm.setIcon(0, UI.PixmapCache.getIcon("syntaxError.png")) |
57 itm.setIcon(0, UI.PixmapCache.getIcon("syntaxError")) |
58 elif code.startswith("N"): |
58 elif code.startswith("N"): |
59 itm.setIcon(0, UI.PixmapCache.getIcon("namingError.png")) |
59 itm.setIcon(0, UI.PixmapCache.getIcon("namingError")) |
60 elif code.startswith("D"): |
60 elif code.startswith("D"): |
61 itm.setIcon(0, UI.PixmapCache.getIcon("docstringError.png")) |
61 itm.setIcon(0, UI.PixmapCache.getIcon("docstringError")) |
62 else: |
62 else: |
63 # unknown category prefix => warning |
63 # unknown category prefix => warning |
64 itm.setIcon(0, UI.PixmapCache.getIcon("warning.png")) |
64 itm.setIcon(0, UI.PixmapCache.getIcon("warning")) |
65 itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) |
65 itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) |
66 if code in codeList: |
66 if code in codeList: |
67 itm.setCheckState(0, Qt.Checked) |
67 itm.setCheckState(0, Qt.Checked) |
68 codeList.remove(code) |
68 codeList.remove(code) |
69 else: |
69 else: |