Helpviewer/HelpWindow.py

changeset 258
9402d145020d
parent 256
04083f42042d
child 313
4872737993ab
--- a/Helpviewer/HelpWindow.py	Sun May 16 18:47:30 2010 +0200
+++ b/Helpviewer/HelpWindow.py	Sun May 16 19:57:46 2010 +0200
@@ -1424,6 +1424,7 @@
         @return guessed URL (QUrl)
         """
         manager = self.searchEdit.openSearchManager()
+        path = Utilities.fromNativeSeparators(path)
         url = manager.convertKeywordSearchToUrl(path)
         if url.isValid():
             return url
@@ -1545,7 +1546,11 @@
                         "All Files (*)"
             ))
         if fn:
-            self.currentBrowser().setSource(QUrl("file://" + fn))
+            if Utilities.isWindowsPlatform():
+                url = "file:///" + Utilities.fromNativeSeparators(fn)
+            else:
+                url = "file://" + fn
+            self.currentBrowser().setSource(QUrl(url))
         
     def __openFileNewTab(self):
         """
@@ -1561,7 +1566,11 @@
                         "All Files (*)"
             ))
         if fn:
-            self.newTab("file://" + fn)
+            if Utilities.isWindowsPlatform():
+                url = "file:///" + Utilities.fromNativeSeparators(fn)
+            else:
+                url = "file://" + fn
+            self.newTab(url)
         
     def __savePageAs(self):
         """

eric ide

mercurial