WebBrowser/Feeds/FeedsDialog.py

branch
QtWebEngine
changeset 4761
9d077d20be75
parent 4758
c973eef8fef1
child 4801
71bdc520f640
--- a/WebBrowser/Feeds/FeedsDialog.py	Sat Feb 20 17:45:40 2016 +0100
+++ b/WebBrowser/Feeds/FeedsDialog.py	Sun Feb 21 18:54:14 2016 +0100
@@ -9,7 +9,7 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import QUrl
+from PyQt5.QtCore import QUrl, qVersion
 from PyQt5.QtWidgets import QDialog, QPushButton, QLabel
 
 from E5Gui import E5MessageBox
@@ -61,16 +61,21 @@
         button = self.sender()
         urlString = button.feed[1]
         url = QUrl(urlString)
-        if not url.host():
-            if not urlString.startswith("/"):
-                urlString = "/" + urlString
-            urlString = self.__browser.url().host() + urlString
-            tmpUrl = QUrl(urlString)
-            if not tmpUrl.scheme():
-                urlString = "http://" + urlString
-            tmpUrl = QUrl(urlString)
-            if not tmpUrl.scheme() or not tmpUrl.host():
-                return
+        if url.isRelative():
+            url = self.__browser.url().resolved(url)
+            if qVersion() >= "5.0.0":
+                urlString = url.toDisplayString(QUrl.FullyDecoded)
+            else:
+                urlString = url.toString()
+##            if not urlString.startswith("/"):
+##                urlString = "/" + urlString
+##            urlString = self.__browser.url().host() + urlString
+##            tmpUrl = QUrl(urlString)
+##            if not tmpUrl.scheme():
+##                urlString = "http://" + urlString
+##            tmpUrl = QUrl(urlString)
+##            if not tmpUrl.scheme() or not tmpUrl.host():
+##                return
         if not url.isValid():
             return
         

eric ide

mercurial