KUrlMimeData: fix handling of PreferLocalUrls
ClosedPublic

Authored by dfaure on Feb 3 2018, 12:42 AM.

Details

Summary

18e4d245d3 didn't quite have the right logic after all

Test Plan

Unittest passes (but this commit proves that it doesn't cover all cases...)

Diff Detail

Repository
R244 KCoreAddons
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
dfaure created this revision.Feb 3 2018, 12:42 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 3 2018, 12:42 AM
dfaure requested review of this revision.Feb 3 2018, 12:42 AM
dfaure updated this revision to Diff 26397.

remove unrelated change

markg accepted this revision.Feb 3 2018, 2:05 AM
markg added a subscriber: markg.

Looks OK to me.
Had to read up on the KDE urls and local urls first though :)

Funny side note. Those that text/uri-list can contain comments! https://tools.ietf.org/html/rfc2483#section-5
But judging from the qmimedata.cpp file, Qt also doesn't check for that (or i didn't find it, possible as well).

This revision is now accepted and ready to land.Feb 3 2018, 2:05 AM
jtamate accepted this revision.Feb 3 2018, 11:51 AM

Looks good (and symmetric).

Is it difficult to create a new test?

This revision was automatically updated to reflect the committed changes.
mwolff added inline comments.Feb 6 2018, 10:06 AM
src/lib/io/kurlmimedata.cpp
67 ↗(On Diff #26396)

future cleanup: remove all the QString::fromLatin1(s_...) in this file with a call to QString kdeUriListMime() { return QStringLiteral("..."); }

dfaure marked an inline comment as done.Feb 7 2018, 11:14 PM
dfaure added inline comments.
src/lib/io/kurlmimedata.cpp
67 ↗(On Diff #26396)