D19033: [about-distro] run absolute paths through qicon intead of qpixmap

Harald Sitter noreply at phabricator.kde.org
Mon Feb 18 13:08:01 GMT 2019


sitter added a comment.


  If I understand it correctly, the bug would only show its ugly head with `QIcon::fromTheme("foo.svg")` but not `QIcon::fromTheme("foo")`. So, if that seems a concern we can just add a comment in the README. Distribution devs would set LogoPath's value manually, so we can just tell them to use a valid value :) Does that seem agreeable @broulik?
  
  @ngraham On a side-note: `foo.svg` is not supported by the specs, so Qt not working with it properly is not even a defect TBH - it'd be an additional convenience feature in Qt. Specifically the desktop entry spec defines `Icon=` as either absolute or it will be run through the lookup described in the icon theme spec, and the icon theme spec sets forth a lookup which explicitly assumes `filename = directory/$(themename)/subdir/iconname.extension` which by extension means a string handed to the theme lookup may only ever be a basename of the icon. It may not be absolute, nor relative, nor contain extensions. So, while it'd be nice if Qt handled sanitation of relative strings, our software is in fact wrong if it allows users to set a (relative) icon with file extension and then runs that through QIcon::fromTheme without adjusting it. The input must either be absolute or properly sanitized to meet the requirements of the icon theme spec.

REPOSITORY
  R102 KInfoCenter

REVISION DETAIL
  https://phabricator.kde.org/D19033

To: sitter, #plasma
Cc: ngraham, broulik, cfeck, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190218/322b3f9b/attachment.html>


More information about the Plasma-devel mailing list