D16508: Eventviews: properly fall back to color-generator if ColorAttribute is absent

David Faure noreply at phabricator.kde.org
Thu Nov 1 23:01:45 GMT 2018


dfaure added inline comments.

INLINE COMMENTS

> dkurz wrote in helper.cpp:71
> You might want to invert the condition here and return early, to reduce the indentation of the following lines, but I guess this is just a matter of taste.

That would duplicate the call to resourceColor:

  if (!hasAttribute)
      return preferences->resourceColor(id);
  
  if (colorAttr && colorAttr->color().isValid())
      return colorAttr->color();
  
  return preferences->resourceColor(id);

Not great IMHO.

BRANCH
  2018_10_color_generation (branched from Applications/18.08)

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

To: dfaure, ochurlaud, dkurz, dvratil
Cc: #kde_pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20181101/2d6abc71/attachment.html>


More information about the kde-pim mailing list