broulik created this revision. broulik added reviewers: Plasma, hein. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision.
REVISION SUMMARY The code tried hard to ignore garbage URLs, as Qt is quite lenient, e.g. `QUrl("Garbage Url")` is still valid. There is no way to change the strictness of a `QUrl` after creation, so the code would enforce it by doing `QUrl strictUrl(inputUrl.toString(), QUrl::StrictMode)`. However, `toString()` defaults to `PrettyDecoded` which avoids percent-encoding and keeps spaces in tact which is not a valid thing to have in a strict URL. Effectively, we want to ensure a URL is either a valid path to a local file, or one of the special `applications` (for menu ids), or `preferred` for preferred applications, like web browser, BUG: 385727 FIXED-IN: 5.18.0 TEST PLAN Is this still good for 5.18? - Unit tests still pass - Comes with a new one to verify adding desktop entries with spaces works - Pinned an application which had spaces in its desktop file to the task bar: - Was successfully added with the menu - Was successfully merged with the window, if open - Was successfully restored/loaded on plasmashell restart - Was successfully removed with the context menu - Created a new activity, pinned an application which had spaces in its desktop file to only one activity: - Was successfully restored/hidden when switching activities - all of the above REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D26941 AFFECTED FILES libtaskmanager/autotests/launchertasksmodeltest.cpp libtaskmanager/launchertasksmodel.cpp libtaskmanager/launchertasksmodel_p.h To: broulik, #plasma, hein Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart