Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py

changeset 3702
dabc69b82c7c
parent 3656
441956d8fce5
child 3715
eabefe4e41a4
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py	Sun Jul 13 16:33:32 2014 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py	Sun Jul 13 18:40:52 2014 +0200
@@ -15,7 +15,7 @@
 
 import os
 
-from PyQt5.QtCore import pyqtSlot, QProcess, QTimer, QUrl, QByteArray
+from PyQt5.QtCore import pyqtSlot, QProcess, QTimer, QUrl
 from PyQt5.QtGui import QTextCursor
 from PyQt5.QtWidgets import QWidget, QDialogButtonBox, QApplication, QLineEdit
 
@@ -332,12 +332,10 @@
                 url = QUrl()
                 url.setScheme("file")
                 url.setPath(self.filename)
-                query = QByteArray()
-                query.append(parent.split(":")[0]).append('_').append(rev)
-                url.setEncodedQuery(query)
+                query = parent.split(":")[0] + '_' + rev
+                url.setQuery(query)
                 dstr += ' [<a href="{0}" name="{1}" id="{1}">{2}</a>]'.format(
-                    url.toString(),
-                    str(query, encoding="ascii"),
+                    url.toString(), query,
                     self.tr('diff to {0}').format(parent),
                 )
             dstr += '<br />\n'
@@ -481,7 +479,7 @@
         if Utilities.isWindowsPlatform():
             if filename.startswith("/"):
                 filename = filename[1:]
-        ver = bytes(url.encodedQuery()).decode()
+        ver = url.query()
         v1, v2 = ver.split('_')
         if v1 == "" or v2 == "":
             return

eric ide

mercurial