Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-107858

qtwayland caches clipboard content

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.7, 6.2.6, 6.4.0
    • QPA: Wayland
    • None
    • Linux/Wayland

    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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: