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

QClipboard's setMimeData copies only the first QUrl in iOS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: Drag and Drop
    • Labels:
      None
    • Environment:
      iPad (8th generation)

      Description

      void MyClass::copyUris(const FileSystemID &fromFileSystemID, const QStringList &uris) {

        auto data = mimeData(fromFileSystemID, uris).toMap();

           auto mime = new QMimeData(); 

        for (auto i = data.constBegin(); i != data.constEnd(); i++)

          mime->setData(i.key(), i.value().toByteArray());

        p->clipboard->setMimeData(mime);

      } 

      The above method works perfectly under android but when running on iOS, setMimeData copies just the first file of the multiple selected.

      Although object "mime" contains (let's say) three QUrls after calling mime->setData(), p->clipboard->mimeData() returns only the first QUrl (after calling p->clipboard->setMimeData().

      p-> clipboard is set to QGuiApplication::clipboard().

        Attachments

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

          Activity

            People

            Assignee:
            vestbo Tor Arne Vestbø
            Reporter:
            michalis Michail Oo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes