eric6/WebBrowser/History/HistoryFilterModel.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8207
d359172d11be
--- a/eric6/WebBrowser/History/HistoryFilterModel.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/WebBrowser/History/HistoryFilterModel.py	Tue Mar 02 17:17:09 2021 +0100
@@ -99,7 +99,7 @@
         
         return self.sourceModel().rowCount() - self.__historyDict[url]
     
-    def data(self, index, role=Qt.DisplayRole):
+    def data(self, index, role=Qt.ItemDataRole.DisplayRole):
         """
         Public method to get data from the model.
         
@@ -144,13 +144,14 @@
         self.dataChanged.emit(
             self.mapFromSource(topLeft), self.mapFromSource(bottomRight))
     
-    def headerData(self, section, orientation, role=Qt.DisplayRole):
+    def headerData(self, section, orientation,
+                   role=Qt.ItemDataRole.DisplayRole):
         """
         Public method to get the header data.
         
         @param section section number (integer)
         @param orientation header orientation (Qt.Orientation)
-        @param role data role (integer)
+        @param role data role (Qt.ItemDataRole)
         @return header data
         """
         return self.sourceModel().headerData(section, orientation, role)

eric ide

mercurial