D28134: Add ColorUtils

Fabian Vogt noreply at phabricator.kde.org
Sat Apr 4 17:47:23 BST 2020


fvogt added inline comments.

INLINE COMMENTS

> colorutils.cpp:90
> +        });
> +    }
> +

If item is neither of those three, it would never call `pending->setValue` at all

> colorutils.cpp:103
> +
> +    if (pending->value().isValid()) {
> +         pending->setValue(luma(result->value().value<QColor>()) > 0.5 ? ColorUtils::Brightness::Light : ColorUtils::Brightness::Dark);

Is this supposed to be `result->value().isValid()` instead?

If no, how can `pending` be valid at this point`?

If yes, how can `result` be valid at this point? It would also mean that `ready` wouldn't get emitted again, which results in a leak.

REPOSITORY
  R169 Kirigami

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

To: cblack, #plasma, mart, davidedmundson
Cc: fvogt, davidedmundson, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200404/11447375/attachment.html>


More information about the Plasma-devel mailing list