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

QFileSystemModel::mimeData ignores the result of QFileSystemModel::mimeTypes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.8.0, 4.8.2
    • None
    • Any

      The function QFileSystemModel::mimeData does not obtain the format from QFileSystemModel::mimeTypes - in contrast to the documentation. The format of QFileSystemModel::mimeData is hard-coded instead ("text/uri-list"). Also consider, that the function QFileSystemModel::mimeTypes is virtual and might be overloaded.

      Suggested fix: Remove the wrong statement from the documentation, but support also "text/plain" (some drop targets expect this). Please find attached an enhanced version of function QFileSystemModel::mimeData (just 2 lines of code added, the most recent attachment is valid).

        1. QFileSystemModel_mimeData.cpp
          0.5 kB
          Winfried Schenke
        2. QFileSystemModel_mimeData.cpp
          0.5 kB
          Winfried Schenke
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            wschenke Winfried Schenke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes