Fixes for the webbrowser. Py2 comp.

Sat, 20 Apr 2013 18:45:45 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sat, 20 Apr 2013 18:45:45 +0200
branch
Py2 comp.
changeset 2599
2373006616da
parent 2598
5d4a7772b646
child 2600
a3feb717c3f0

Fixes for the webbrowser.

Helpviewer/History/HistoryManager.py file | annotate | diff | comparison | revisions
Helpviewer/UrlBar/UrlBar.py file | annotate | diff | comparison | revisions
Helpviewer/VirusTotalApi.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/History/HistoryManager.py	Mon Apr 15 20:26:57 2013 +0200
+++ b/Helpviewer/History/HistoryManager.py	Sat Apr 20 18:45:45 2013 +0200
@@ -467,7 +467,7 @@
             stream.writeUInt32(HISTORY_VERSION)
             stream.writeString(itm.url.encode())
             stream << itm.dateTime
-            stream.writeString(itm.title.encode())
+            stream.writeString(itm.title.encode('utf-8'))
             f.write(data)
         
         f.close()
--- a/Helpviewer/UrlBar/UrlBar.py	Mon Apr 15 20:26:57 2013 +0200
+++ b/Helpviewer/UrlBar/UrlBar.py	Sat Apr 20 18:45:45 2013 +0200
@@ -317,8 +317,8 @@
                 
                 gradient = QLinearGradient(QPointF(0, 0), QPointF(self.width(), 0))
                 gradient.setColorAt(0, loadingColor)
-                gradient.setColorAt(progress / 100 - 0.000001, loadingColor)
-                gradient.setColorAt(progress / 100, backgroundColor)
+                gradient.setColorAt(progress / 100.0 - 0.000001, loadingColor)
+                gradient.setColorAt(progress / 100.0, backgroundColor)
                 p.setBrush(QPalette.Base, gradient)
             
             self.setPalette(p)
--- a/Helpviewer/VirusTotalApi.py	Mon Apr 15 20:26:57 2013 +0200
+++ b/Helpviewer/VirusTotalApi.py	Sat Apr 20 18:45:45 2013 +0200
@@ -8,6 +8,10 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
+try:
+    str = unicode
+except (NameError):
+    pass
 
 import json
 

eric ide

mercurial