SwipeItem: Fix using QRC resources and custom image providers.
ClosedPublic

Authored by lepagevalleeemmanuel on May 23 2018, 7:34 AM.

Details

Summary

This patch does 2 things.

  1. Check for the iconSource as defined in Action.qml
  1. Mitigate the misuse of QUrl in desktopicon.cpp

Note that this isn't 100% correct. Imageprovider strings are not really URL, they are URI, it can be anything and include URI arguments. I think the proper solution would be to check exactly what QML does when ocnversion image:// into identifier and do exactly that. Right now a string that works in Image{} and was valid per the image provider doc was modified by QUrl into something else.

Test Plan

Manual testing

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Kirigami. · View Herald TranscriptMay 23 2018, 7:34 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
lepagevalleeemmanuel requested review of this revision.May 23 2018, 7:34 AM
mart accepted this revision.May 23 2018, 11:23 AM
mart added inline comments.
src/desktopicon.cpp
440

use the kdelibs style, with {} always present

This revision is now accepted and ready to land.May 23 2018, 11:23 AM
broulik added inline comments.
src/desktopicon.cpp
440

startWith() avoids creating a temporary string just for comparison

This revision was automatically updated to reflect the committed changes.