D10155: Use the much faster urls() method from QMimeData

David Faure noreply at phabricator.kde.org
Sun Jan 28 10:15:43 UTC 2018


dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  Ah I guess it's faster because QMimeData skips the encoding/decoding via QByteArray when both drag and drop are in the same process? That's not something we can do ourselves (for the "kde uri list" mimetype), unless we call the protected QMimeData::retrieveData, I guess. Hmm.

INLINE COMMENTS

> kurlmimedata.cpp:76
>      if (ba.isEmpty()) {
>          ba = mimeData->data(QString::fromLatin1(secondMimeType));
> +        // If extracting uris from test/uri-list, use the much faster QMimeData method urls()

But then why call this at all, if you don't need the bytearray?
Just make it

  if (mimeData->hasUrls())

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D10155

To: jtamate, #frameworks, dfaure
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180128/4b8f8142/attachment.html>


More information about the Kde-frameworks-devel mailing list