Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py

changeset 4013
e3c30bae0d15
parent 3702
dabc69b82c7c
child 4021
195a471c327b
diff -r 0411fc21e40c -r e3c30bae0d15 Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py	Tue Dec 30 19:29:44 2014 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py	Wed Dec 31 12:44:08 2014 +0100
@@ -15,7 +15,8 @@
 
 import os
 
-from PyQt5.QtCore import QTimer, QProcess, QRegExp, QUrl, pyqtSlot
+from PyQt5.QtCore import QTimer, QProcess, QRegExp, QUrl, pyqtSlot, qVersion, \
+    QByteArray
 from PyQt5.QtGui import QTextCursor
 from PyQt5.QtWidgets import QWidget, QLineEdit, QApplication, QDialogButtonBox
 
@@ -182,8 +183,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),
@@ -272,7 +278,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 v1 == "" or v2 == "":

eric ide

mercurial