Commit 65aa436e authored by muxator's avatar muxator
Browse files

py3: fix drag & drop in the Repository Registry

Before this change, dragging & dropping repositories across groups in the
registry was not working on py3: at drop, the message b'Start tag expected.'
was printed in the console, but nothing happened.

The reason is that QMimeData::data() returns a QByteArray containing an XML
document that was passed through str() and directly fed to
repotreemodel.readXml(), which instead expects either a unicode string or
bytes.

This change converts the QByteArray to bytes(), and restores the drag & drop
functionality in the Repo Registry.

--HG--
branch : stable
parent 2ab531a6b85d
Pipeline #8169 failed with stage
in 4 minutes and 33 seconds
......@@ -225,7 +225,7 @@ class RepoTreeModel(QAbstractItemModel):
def dropMimeData(self, data, action, row, column, parent):
group = parent.internalPointer()
d = str(data.data(repoRegMimeType))
d = bytes(data.data(repoRegMimeType))
if not data.hasUrls():
# The source is a group
if row < 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment