eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8166
bd5cd5858503
child 8188
bfa6c0969acf
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py	Sat Mar 06 10:00:52 2021 +0100
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCodeSelectionDialog.py	Sun Mar 28 15:00:11 2021 +0200
@@ -81,15 +81,17 @@
                 itm.setIcon(0, UI.PixmapCache.getIcon("docstringError"))
             elif code.startswith("S"):
                 itm.setIcon(0, UI.PixmapCache.getIcon("securityLow"))
+            elif code.startswith("P"):
+                itm.setIcon(0, UI.PixmapCache.getIcon("dirClosed"))
             else:
                 # unknown category prefix => warning
                 itm.setIcon(0, UI.PixmapCache.getIcon("warning"))
-            itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable)
+            itm.setFlags(itm.flags() | Qt.ItemFlag.ItemIsUserCheckable)
             if code in codeList:
-                itm.setCheckState(0, Qt.Checked)
+                itm.setCheckState(0, Qt.CheckState.Checked)
                 codeList.remove(code)
             else:
-                itm.setCheckState(0, Qt.Unchecked)
+                itm.setCheckState(0, Qt.CheckState.Unchecked)
         self.codeTable.resizeColumnToContents(0)
         self.codeTable.resizeColumnToContents(1)
         self.codeTable.header().setStretchLastSection(True)
@@ -107,7 +109,7 @@
         
         for index in range(self.codeTable.topLevelItemCount()):
             itm = self.codeTable.topLevelItem(index)
-            if itm.checkState(0) == Qt.Checked:
+            if itm.checkState(0) == Qt.CheckState.Checked:
                 selectedCodes.append(itm.text(0))
         
         return ", ".join(self.__extraCodes + selectedCodes)

eric ide

mercurial