Set the format of the data stream used to save information explicitly to ensure compatibility of the resulting file with Qt 5.0.

Wed, 03 Oct 2012 16:38:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 03 Oct 2012 16:38:44 +0200
changeset 2095
5bf2d8a73173
parent 2094
88620e11c67c
child 2097
c5809ca16182

Set the format of the data stream used to save information explicitly to ensure compatibility of the resulting file with Qt 5.0.

E5Gui/E5SideBar.py file | annotate | diff | comparison | revisions
E5Gui/E5ToolBarManager.py file | annotate | diff | comparison | revisions
Helpviewer/CookieJar/CookieJar.py file | annotate | diff | comparison | revisions
Helpviewer/History/HistoryManager.py file | annotate | diff | comparison | revisions
--- a/E5Gui/E5SideBar.py	Wed Oct 03 15:36:41 2012 +0200
+++ b/E5Gui/E5SideBar.py	Wed Oct 03 16:38:44 2012 +0200
@@ -492,6 +492,7 @@
         
         data = QByteArray()
         stream = QDataStream(data, QIODevice.WriteOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         
         stream.writeUInt16(self.Version)
         stream.writeBool(self.__minimized)
@@ -524,6 +525,7 @@
         
         data = QByteArray(state)
         stream = QDataStream(data, QIODevice.ReadOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         stream.readUInt16()  # version
         minimized = stream.readBool()
         
--- a/E5Gui/E5ToolBarManager.py	Wed Oct 03 15:36:41 2012 +0200
+++ b/E5Gui/E5ToolBarManager.py	Wed Oct 03 16:38:44 2012 +0200
@@ -446,6 +446,7 @@
         """
         data = QByteArray()
         stream = QDataStream(data, QIODevice.WriteOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         stream.writeUInt16(E5ToolBarManager.VersionMarker)
         stream.writeUInt16(version)
         
@@ -501,6 +502,7 @@
         
         data = QByteArray(state)
         stream = QDataStream(data, QIODevice.ReadOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         marker = stream.readUInt16()
         vers = stream.readUInt16()
         if marker != E5ToolBarManager.VersionMarker or vers != version:
--- a/Helpviewer/CookieJar/CookieJar.py	Wed Oct 03 15:36:41 2012 +0200
+++ b/Helpviewer/CookieJar/CookieJar.py	Wed Oct 03 16:38:44 2012 +0200
@@ -65,6 +65,7 @@
         """
         data = QByteArray()
         stream = QDataStream(data, QIODevice.WriteOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         stream.writeUInt16(self.JAR_VERSION)
         stream.writeUInt32(len(cookiesList))
         for cookie in cookiesList:
@@ -85,6 +86,7 @@
         cookiesList = []
         data = QByteArray(cookies)
         stream = QDataStream(data, QIODevice.ReadOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         
         version = stream.readUInt16()
         if version != self.JAR_VERSION:
--- a/Helpviewer/History/HistoryManager.py	Wed Oct 03 15:36:41 2012 +0200
+++ b/Helpviewer/History/HistoryManager.py	Wed Oct 03 16:38:44 2012 +0200
@@ -384,6 +384,7 @@
         lastInsertedItem = HistoryEntry()
         data = QByteArray(historyFile.readAll())
         stream = QDataStream(data, QIODevice.ReadOnly)
+        stream.setVersion(QDataStream.Qt_4_6)
         while not stream.atEnd():
             ver = stream.readUInt32()
             if ver != HISTORY_VERSION:
@@ -457,6 +458,7 @@
         for index in range(first, -1, -1):
             data = QByteArray()
             stream = QDataStream(data, QIODevice.WriteOnly)
+            stream.setVersion(QDataStream.Qt_4_6)
             itm = self.__history[index]
             stream.writeUInt32(HISTORY_VERSION)
             stream.writeString(itm.url.encode())

eric ide

mercurial