src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py

branch
eric7
changeset 11000
f8371a2dd08f
parent 10980
40e1979abdb7
child 11029
1cd8701ed260
diff -r c3cf24fe9113 -r f8371a2dd08f src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py
--- a/src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py	Tue Oct 22 17:22:53 2024 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/DebuggerGeneralPage.py	Tue Oct 22 17:49:41 2024 +0200
@@ -429,7 +429,7 @@
         idxEnd = self.index(0, 2, QModelIndex())
         self.dataChanged.emit(idxStart, idxEnd)
 
-    def index(self, row, column, parent=QModelIndex()):
+    def index(self, row, column, parent=None):
         """
         Public Qt slot to get the index of item at row:column of parent.
 
@@ -437,11 +437,14 @@
         @type int
         @param column number of columns
         @type int
-        @param parent the model parent
-        @type QModelIndex
+        @param parent the model parent (defaults to None)
+        @type QModelIndex (optional)
         @return new model index for child
         @rtype QModelIndex
         """
+        if parent is None:
+            parent = QModelIndex()
+
         if not self.hasIndex(row, column, parent):
             return QModelIndex()
 
@@ -458,23 +461,23 @@
         """
         return QModelIndex()
 
-    def columnCount(self, parent=QModelIndex()):  # noqa: U100
+    def columnCount(self, parent=None):  # noqa: U100
         """
         Public Qt slot to get the column count.
 
-        @param parent the model parent (unused)
-        @type QModelIndex
+        @param parent the model parent (defaults to None) (unused)
+        @type QModelIndex (optional)
         @return number of columns
         @rtype int
         """
         return 1
 
-    def rowCount(self, parent=QModelIndex()):  # noqa: U100
+    def rowCount(self, parent=None):  # noqa: U100
         """
         Public Qt slot to get the row count.
 
-        @param parent the model parent (unused)
-        @type QModelIndex
+        @param parent the model parent (defaults to None) (unused)
+        @type QModelIndex (optional)
         @return number of rows
         @rtype int
         """

eric ide

mercurial