Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py

changeset 4013
e3c30bae0d15
parent 3702
dabc69b82c7c
child 4021
195a471c327b
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py	Tue Dec 30 19:29:44 2014 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py	Wed Dec 31 12:44:08 2014 +0100
@@ -14,7 +14,7 @@
 
 import pysvn
 
-from PyQt5.QtCore import QMutexLocker, QUrl, Qt
+from PyQt5.QtCore import QMutexLocker, QUrl, Qt, QByteArray, qVersion
 from PyQt5.QtGui import QCursor, QTextCursor
 from PyQt5.QtWidgets import QWidget, QApplication, QDialogButtonBox
 
@@ -140,8 +140,13 @@
                     url = QUrl()
                     url.setScheme("file")
                     url.setPath(self.filename)
-                    query = lv + '_' + ver
-                    url.setQuery(query)
+                    if qVersion() >= "5.0.0":
+                        query = lv + '_' + ver
+                        url.setQuery(query)
+                    else:
+                        query = QByteArray()
+                        query.append(lv).append('_').append(ver)
+                        url.setEncodedQuery(query)
                     dstr += ' [<a href="{0}" name="{1}">{2}</a>]'.format(
                         url.toString(), query,
                         self.tr('diff to {0}').format(lv)
@@ -236,7 +241,10 @@
         if Utilities.isWindowsPlatform():
             if filename.startswith("/"):
                 filename = filename[1:]
-        ver = url.query()
+        if qVersion() >= "5.0.0":
+            ver = url.query()
+        else:
+            ver = bytes(url.encodedQuery()).decode()
         v1 = ver.split('_')[0]
         v2 = ver.split('_')[1]
         if not v1 or not v2:

eric ide

mercurial