Helpviewer/History/HistoryManager.py

changeset 1693
9bb872e26a33
parent 1670
6fd889391d2c
child 1853
01812b281a1e
--- a/Helpviewer/History/HistoryManager.py	Sun Mar 04 13:04:47 2012 +0100
+++ b/Helpviewer/History/HistoryManager.py	Sun Mar 04 18:20:13 2012 +0100
@@ -211,11 +211,12 @@
         @param url URL to be added (string)
         """
         cleanurl = QUrl(url)
-        cleanurl.setPassword("")
-        if cleanurl.host():
-            cleanurl.setHost(cleanurl.host().lower())
-        itm = HistoryEntry(cleanurl.toString(), QDateTime.currentDateTime())
-        self._addHistoryEntry(itm)
+        if cleanurl.scheme() not in ["eric", "about"]:
+            cleanurl.setPassword("")
+            if cleanurl.host():
+                cleanurl.setHost(cleanurl.host().lower())
+            itm = HistoryEntry(cleanurl.toString(), QDateTime.currentDateTime())
+            self._addHistoryEntry(itm)
     
     def updateHistoryEntry(self, url, title):
         """
@@ -224,14 +225,16 @@
         @param url URL of the entry to update (string)
         @param title title of the entry to update (string)
         """
-        for index in range(len(self.__history)):
-            if url == self.__history[index].url:
-                self.__history[index].title = title
-                self.__saveTimer.changeOccurred()
-                if not self.__lastSavedUrl:
-                    self.__lastSavedUrl = self.__history[index].url
-                self.entryUpdated.emit(index)
-                break
+        cleanurl = QUrl(url)
+        if cleanurl.scheme() not in ["eric", "about"]:
+            for index in range(len(self.__history)):
+                if url == self.__history[index].url:
+                    self.__history[index].title = title
+                    self.__saveTimer.changeOccurred()
+                    if not self.__lastSavedUrl:
+                        self.__lastSavedUrl = self.__history[index].url
+                    self.entryUpdated.emit(index)
+                    break
     
     def removeHistoryEntry(self, url, title=""):
         """

eric ide

mercurial