Reinstantiated code after QByteArray was fixed in PyQt6. eric7

Fri, 21 May 2021 17:43:14 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 21 May 2021 17:43:14 +0200
branch
eric7
changeset 8341
e470de1e6628
parent 8340
439b5c4c9115
child 8342
0613a64f1b64

Reinstantiated code after QByteArray was fixed in PyQt6.

eric7/E5Gui/E5ToolBarManager.py file | annotate | diff | comparison | revisions
eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py file | annotate | diff | comparison | revisions
--- a/eric7/E5Gui/E5ToolBarManager.py	Fri May 21 17:42:10 2021 +0200
+++ b/eric7/E5Gui/E5ToolBarManager.py	Fri May 21 17:43:14 2021 +0200
@@ -539,9 +539,7 @@
         if state.isEmpty():
             return False
         
-        # FIXME: this copies only up to the first \0 character
-##        data = QByteArray(state)
-        data = state
+        data = QByteArray(state)
         stream = QDataStream(data, QIODevice.OpenModeFlag.ReadOnly)
         stream.setVersion(QDataStream.Version.Qt_4_6)
         marker = stream.readUInt16()
--- a/eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Fri May 21 17:42:10 2021 +0200
+++ b/eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Fri May 21 17:43:14 2021 +0200
@@ -88,9 +88,9 @@
         @type QMouseEvent
         """
         if (
-            event.buttons() == Qt.MouseButtons(Qt.MouseButton.LeftButton) and
-            (event.position().toPoint() - self.__dragStartPos).manhattanLength() >
-                QApplication.startDragDistance()
+            event.buttons() == Qt.MouseButton.LeftButton and
+            (event.position().toPoint() - self.__dragStartPos)
+            .manhattanLength() > QApplication.startDragDistance()
         ):
             drag = QDrag(self)
             mimeData = QMimeData()

eric ide

mercurial