From f5e08f4fffa3abae9a7fe91d9a27e97e622b9360 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Mon, 2 Oct 2023 16:05:46 +0200 Subject: [PATCH] compare: Robustness on dnd mimetype data --- src/silx/gui/widgets/UrlSelectionTable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/silx/gui/widgets/UrlSelectionTable.py b/src/silx/gui/widgets/UrlSelectionTable.py index 3909aa315e..40ee738909 100644 --- a/src/silx/gui/widgets/UrlSelectionTable.py +++ b/src/silx/gui/widgets/UrlSelectionTable.py @@ -336,7 +336,8 @@ def dropMimeData(self, row: int, column: int, mimedata: qt.QMimeType, action: qt if action == qt.Qt.IgnoreAction: return True if mimedata.hasFormat(constants.SILX_URI_MIMETYPE): - url = DataUrl(mimedata.text()) + urlText = str(mimedata.data(constants.SILX_URI_MIMETYPE), "utf-8") + url = DataUrl(urlText) self.addUrl(url) return True return False