D24865: [SystemTray] Support for AttentionIcon

Kai Uwe Broulik noreply at phabricator.kde.org
Tue Oct 29 08:57:02 GMT 2019


broulik added inline comments.

INLINE COMMENTS

> systemtray.cpp:354
> +{
> +    if (!value.isValid() || value.isNull() || !value.canConvert<QIcon>()) {
> +        return false;

I think you don't need any of that. If you convert it to a `QIcon` which it is not, it will return a default-constructed (null) `QIcon`

> systemtray.cpp:358
> +    QIcon icon = value.value<QIcon>();
> +    return !icon.name().isEmpty() || !icon.isNull();
> +}

I am not sure you should check for `name` being empty, since it could have just pixmaps inside, not a themed icon?

REPOSITORY
  R120 Plasma Workspace

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

To: kmaterka, #plasma, broulik, #plasma_workspaces
Cc: lbeltrame, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191029/a78d43a8/attachment-0001.html>


More information about the Plasma-devel mailing list