src/eric7/WebBrowser/History/HistoryManager.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
--- a/src/eric7/WebBrowser/History/HistoryManager.py	Fri Dec 22 13:57:47 2023 +0100
+++ b/src/eric7/WebBrowser/History/HistoryManager.py	Fri Dec 22 17:24:07 2023 +0100
@@ -48,10 +48,14 @@
         """
         Constructor
 
-        @param url URL of the history entry (string)
-        @param dateTime date and time this entry was created (QDateTime)
-        @param title title string for the history entry (string)
-        @param visitCount number of visits of this URL (int)
+        @param url URL of the history entry
+        @type str
+        @param dateTime date and time this entry was created
+        @type QDateTime
+        @param title title string for the history entry
+        @type str
+        @param visitCount number of visits of this URL
+        @type int
         """
         self.url = url and url or ""
         self.dateTime = dateTime and dateTime or QDateTime()
@@ -63,8 +67,9 @@
         Special method determining equality.
 
         @param other reference to the history entry to compare against
-            (HistoryEntry)
-        @return flag indicating equality (boolean)
+        @type HistoryEntry
+        @return flag indicating equality
+        @rtype bool
         """
         return (
             other.title == self.title
@@ -79,8 +84,9 @@
         Note: History is sorted in reverse order by date and time
 
         @param other reference to the history entry to compare against
-            (HistoryEntry)
-        @return flag indicating less (boolean)
+        @type HistoryEntry
+        @return flag indicating less
+        @rtype bool
         """
         return self.dateTime > other.dateTime
 
@@ -88,7 +94,8 @@
         """
         Public method to get the title of the history entry.
 
-        @return title of the entry (string)
+        @return title of the entry
+        @rtype str
         """
         if not self.title:
             page = pathlib.Path(QUrl(self.url).path()).name
@@ -132,7 +139,8 @@
         """
         Constructor
 
-        @param parent reference to the parent object (QObject)
+        @param parent reference to the parent object
+        @type QObject
         """
         super().__init__(parent)
 
@@ -173,7 +181,8 @@
         """
         Public method to return the history.
 
-        @return reference to the list of history entries (list of HistoryEntry)
+        @return reference to the list of history entries
+        @rtype list of HistoryEntry
         """
         return self.__history[:]
 
@@ -182,9 +191,9 @@
         Public method to set a new history.
 
         @param history reference to the list of history entries to be set
-            (list of HistoryEntry)
+        @type list of HistoryEntry
         @param loadedAndSorted flag indicating that the list is sorted
-            (boolean)
+        @type bool
         """
         self.__history = history[:]
         if not loadedAndSorted:
@@ -267,8 +276,10 @@
         """
         Public method to update a history entry.
 
-        @param url URL of the entry to update (string)
-        @param title title of the entry to update (string)
+        @param url URL of the entry to update
+        @type str
+        @param title title of the entry to update
+        @type str
         """
         if QUrl(url).scheme() not in ["eric", "about", "data", "chrome"]:
             cleanUrlStr = self.__cleanUrlStr(QUrl(url))
@@ -285,8 +296,10 @@
         """
         Public method to remove a history entry.
 
-        @param url URL of the entry to remove (QUrl)
-        @param title title of the entry to remove (string)
+        @param url URL of the entry to remove
+        @type QUrl
+        @param title title of the entry to remove
+        @type str
         """
         if url.scheme() not in ["eric", "about", "data", "chrome"]:
             cleanUrlStr = self.__cleanUrlStr(url)
@@ -335,7 +348,8 @@
         """
         Public method to get a reference to the history model.
 
-        @return reference to the history model (HistoryModel)
+        @return reference to the history model
+        @rtype HistoryModel
         """
         return self.__historyModel
 
@@ -343,7 +357,8 @@
         """
         Public method to get a reference to the history filter model.
 
-        @return reference to the history filter model (HistoryFilterModel)
+        @return reference to the history filter model
+        @rtype HistoryFilterModel
         """
         return self.__historyFilterModel
 
@@ -351,7 +366,8 @@
         """
         Public method to get a reference to the history tree model.
 
-        @return reference to the history tree model (HistoryTreeModel)
+        @return reference to the history tree model
+        @rtype HistoryTreeModel
         """
         return self.__historyTreeModel
 
@@ -388,7 +404,8 @@
         """
         Public method to get the days for entry expiration.
 
-        @return days for entry expiration (integer)
+        @return days for entry expiration
+        @rtype int
         """
         return self.__daysToExpire
 
@@ -396,7 +413,8 @@
         """
         Public method to set the days for entry expiration.
 
-        @param limit days for entry expiration (integer)
+        @param limit days for entry expiration
+        @type int
         """
         if self.__daysToExpire == limit:
             return
@@ -416,7 +434,8 @@
         """
         Public slot to clear the complete history.
 
-        @param period history period in milliseconds to be cleared (integer)
+        @param period history period in milliseconds to be cleared
+        @type int
         """
         if period == 0:
             self.__history = []
@@ -437,7 +456,8 @@
         """
         Public method to get the file name of the history file.
 
-        @return name of the history file (string)
+        @return name of the history file
+        @rtype str
         """
         return os.path.join(Globals.getConfigDir(), "web_browser", "history")
 

eric ide

mercurial