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()
This can't be right, it would mean ba is ignored when
firstMimeType==text/uri-list (which would mean the call to data() above was for
nothing).
Since the method to call (data() or urls()) depends on the mimetype, either the
whole idea of swapping the mimetypes has to be dropped, or as Milian suggests,
a helper with an if() should encapsulate this (so we can call it in both
places) (but that's more string comparisons....).
To make it fast I'd do, well, OK the code wouldn't fit into this margin, let's
make a separate RR: https://phabricator.kde.org/D10257
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D10155
To: jtamate, #frameworks, dfaure
Cc: mwolff, michaelh, ngraham