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

Drag and Drop performance on Mac OS X

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.6.3, 4.7.0
    • GUI: Drag and Drop
    • None
    • Mac OS X Cocoa

    • macOS

      Our application is using QDrag object with overridden QMimeData object. we have overridden formats() and retrieveData() operations of QMimeData to return media(image) data from our custom MimeData object. However this retrieveData operation is expensive for large sized files.

      Overridden MimeData object sample code:

      QStringList CustomMimeData::formats() const
      {
      QStringList list = QMimeData::formats();
      if (hasImageUrls())
      list << "application/x-qt-image";

      return list;
      }

      QVariant CustomMimeData::retrieveData(const QString & mimetype, QVariant::Type type) const
      {
      if (mimetype == "application/x-qt-image")
      {
      //Expensive call. Retrieves image data
      }
      else
      return QMimeData::retrieveData(mimetype, type);;
      }

      Problem here is that Qt drag operation is trying to retrieve the data even though it only works on urls of the object. This is affecting performance of drag operations with in our applications.
      It would be good if this could be changed to not retrieve the data until its needed. Possibly changed in QMacPasteboard::setMimeData(QMimeData *mime_src) .

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

            pullatti Prasanth Ullattil
            xcm Martin Petersson (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes