Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.7, 6.2.6, 6.4.0
-
None
-
-
19758eb40 (dev), 6bd5c70b8 (6.7), 18be006f4 (6.6), 49901affa (tqtc/lts-6.5), 9ce6a85f7 (tqtc/lts-6.2), 4f363a988 (tqtc/lts-5.15)
Description
Since GNOME 43, Nautilus is based on GTK4 and supports the FileTransfer portal. FileTransfer portal's IDs are valid only for one-time access and Nautilus gives a new FileTransfer ID on every request. So, if Qt application wants to check file content in QTextEdit::canInsertFromMimeData and then actually use the file in QTextEdit::insertFromMimeData, it has to access FileTransfer portal twice. With the xcb backend it works just fine: every mimeData->data("application/vnd.portal.filetransfer") request gives new transfer ID. With wayland backend, it gives the same ID when requesting in QTextEdit::canInsertFromMimeData and QTextEdit::insertFromMimeData what leads to "Invalid transfer" errors.
I suspect this cache is the cause of this behavior difference: https://github.com/qt/qtwayland/blob/47ebd2ae5e40f5d1228edd3a35d0272dcf545585/src/client/qwaylanddataoffer.cpp#L120-L121
Attachments
Issue Links
- relates to
-
QTBUG-102458 better xdg-desktop-portal support
-
- Reported
-