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

Don't use QMimeData.setUrls when copying links?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.3.1
    • WebEngine
    • None
    • Linux/X11

      When e.g. using "Copy link address", QtWebEngine calls QMimeData::setUrls, which results in setting text/uri-list and text/x-moz-url in the clipboard:

      $ xclip -sel clipboard -o -t TARGETS | while read t; do [[ "$t" != TARGETS ]] && echo "$t: $(xclip -o -t "$t" -sel clipboard)"; done
      text/plain: https://code.qt.io/cgit/
      UTF8_STRING: https://code.qt.io/cgit/
      STRING: https://code.qt.io/cgit/
      TEXT: https://code.qt.io/cgit/
      text/html: <a href="https://code.qt.io/cgit/"></a>
      text/uri-list: https://code.qt.io/cgit/
      text/x-moz-url: https://code.qt.io/cgit/
      [...]
      

      However, both Chromium and Firefox do no such thing - for comparison:

      STRING: https://code.qt.io/cgit/
      UTF8_STRING: https://code.qt.io/cgit/
      TEXT: https://code.qt.io/cgit/
      text/plain: https://code.qt.io/cgit/
      text/plain;charset=utf-8: https://code.qt.io/cgit/
      [...]
      

      This seems to cause compatibility issues depending on where the content is pasted to. When e.g. trying to paste it in Signal Desktop (which seems to use Electron), nothing happens, while copying from Chromium and Firefox works fine.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes