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

QClipboard's setMimeData copies only the first QUrl in iOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15.2
    • GUI: Drag and Drop
    • None
    • iPad (8th generation)
    • iOS/tvOS/watchOS

      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().

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

            vestbo Tor Arne Vestbø
            michalis Michail Oo
            Richard Moe Gustavsen Richard Moe Gustavsen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes