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

QMimeData::hasImage reports true while imageData is null

    XMLWordPrintable

Details

    • Linux/X11

    Description

      I have very similar bug to QTBUG-31069 but on Linux.

      What I do..
      I have overrriden QTextEdit::insertFromMimeData and from its handler I do

      QImage img(qvariant_cast<QImage>(data->imageData()));
      

      data->hasImage() always reports true when I copied an image. but the `img` variable is usually always null.

      For example if I copy an image to the clipboard and start pressing ctrl+v repeatedy then likely only once of 10 times img won't be null.

      If I insert to some other app like Gimp it's always inserted properly.

      Formats reported by mimedata for every insert attempts (no difference when succeed)

      ("TIMESTAMP", "TARGETS", "SAVE_TARGETS", "MULTIPLE", "image/png", "text/html", "application/x-qt-image") 
       

      Attachments

        Issue Links

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

          Activity

            People

              rion Rion
              rion Rion
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes