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

QMimeData urls break when copying address from Chrome

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.3.2
    • GUI: Drag and Drop
    • None
    • Qt 5.3.2 on Kubuntu 14.10

      When copying the entire address from Chrome's address bar (not just parts of it, needs to be the full address), QMimeData::hasUrls() returns true but I get two invalid URLs.

      QMimeData::formats() returns

      ("TARGETS", "SAVE_TARGETS", "MULTIPLE", "text/plain", "text/uri-list", "chromium/x-bookmark-entries")
      

      and getting the raw data from text/uri-list gives me the following

      h\0t\0t\0p\0s\0:\0/\0/\0c\0o\0d\0e\0.\0g\0o\0o\0g\0l\0e\0.\0c\0o\0m\0/

      which looks like Ascii in Unicode. it seems the first \0 is interpreted as end of string and stuff breaks.

      I'm filing this here since I am rather clueless what to do and who's responsible for this. Chrome possibly sending broken data (copying a file from KDE's file manager Dolphin results in proper URLs), Qt for breaking with this data or KDE's Klipper for ignoring the priority order.

      The relevant Chromium bug with a simple code snippet can be found here [1].

      [1] https://code.google.com/p/chromium/issues/detail?id=428646

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

            Unassigned Unassigned
            broulik Kai Uwe Broulik
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes