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

2018-02-02 Thread David Faure
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()

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

2018-01-31 Thread Jaime Torres Amate
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

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

2018-01-30 Thread Milian Wolff
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

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

2018-01-28 Thread Jaime Torres Amate
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

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

2018-01-28 Thread David Faure
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

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

2018-01-28 Thread Jaime Torres Amate
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

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

2018-01-28 Thread David Faure
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

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

2018-01-28 Thread Jaime Torres Amate
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