D27539: KIO::iconNameForUrl: fix searching for kde protocol icons

David Faure noreply at phabricator.kde.org
Sat Feb 22 10:38:04 GMT 2020


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> global.cpp:240
>          // Let KFileItem::iconName handle things for us
> -        if (i == unknown || i.isEmpty() || mt.isDefault()) {
> +        if (iconName.isEmpty() || mt.isDefault()) {
>              const KFileItem item(url, mt.name());

With the new logic, I'm not sure what the mt.isDefault() is useful for. I think it can be removed.

> global.cpp:268
>      }
> -    return !i.isEmpty() ? i : unknown;
> +    // if we found nothing, revert to mimeTypeIcon (which is usually "application-octet-stream")
> +    return !iconName.isEmpty() ? iconName : mt.iconName();

There's no variable called mimeTypeIcon anymore.

REPOSITORY
  R241 KIO

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

To: meven, ngraham, #frameworks, dfaure, broulik, sitter
Cc: sitter, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200222/05cd1a1a/attachment.html>


More information about the Kde-frameworks-devel mailing list