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

Drag-n-drop from zip file opened in Windows Explorer is empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.3, 6.7.1, 6.7.2
    • None
    • Windows

    Description

      When calling `QMimeData::data("application/x-qt-windows-mime;value=\"FileContents\";index=0");` to retrieve file contents from a `QDropEvent`, an invalid buffer is returned if the source file is inside a zip file opened in windows explorer.

      Steps to reproduce:

      1. Compile and run the attached example
      2. Open test.zip from the attached example in Windows Explorer
      1. Drag test.txt into the example application
      1. `QMimeData::data()` returns an invalid buffer (`QByteArray::isNull` returns `true`) and the application displays "<null>"
      1. Unzip test.zip
      1. Drag the new uncompressed test.txt into the example application
      1. `QMimeData::data()` returns the content of test.txt and the application correctly displays the file contents: "Test!"

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            johannese Johannes Elgaard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes