dfaure added inline comments.
INLINE COMMENTS
> kurlmimedata.cpp:75
> +QByteArray ba = mimeData->data(firstMimeType);
> +if (ba.isEmpty() || firstMimeType == QStringLiteral("text/uri-list")) {
> // Extracting uris from text/uri-list, use the much faster QMimeData
> method urls()
jtamate updated this revision to Diff 26238.
jtamate added a comment.
Something like this?
> if firstMimeType == "text/uri-list" (see above, PreferLocalUrls), it's
still going to be slow, no? Should this be handled >generally here by
introducing a helper that checks the mime type and the
mwolff added inline comments.
INLINE COMMENTS
> kurlmimedata.cpp:74
> }
> QByteArray ba = mimeData->data(QString::fromLatin1(firstMimeType));
> if (ba.isEmpty()) {
if `firstMimeType == "text/uri-list"` (see above, `PreferLocalUrls`), it's
still going to be slow, no? Should this b
This revision was automatically updated to reflect the committed changes.
Closed by commit R244:18e4d245d3d5: Use the much faster urls() method from
QMimeData (authored by jtamate).
REPOSITORY
R244 KCoreAddons
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D10155?vs=26110&id=26113
RE
dfaure accepted this revision.
This revision is now accepted and ready to land.
REPOSITORY
R244 KCoreAddons
BRANCH
paste (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D10155
To: jtamate, #frameworks, dfaure
Cc: michaelh
jtamate updated this revision to Diff 26110.
jtamate added a comment.
- Use the much faster urls() method from QMimeData
Using hasUrls() and fixed a typo in the comment
REPOSITORY
R244 KCoreAddons
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D10155?vs=26096&id=26110
BRANCH
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
jtamate created this revision.
jtamate added reviewers: Frameworks, dfaure.
Restricted Application added a project: Frameworks.
jtamate requested review of this revision.
REVISION SUMMARY
When requesting a list of text/uri-list, use the much faster QMimeData
urls() method.
The unittests pass