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

Denis Kurz noreply at phabricator.kde.org
Wed Oct 31 11:33:49 GMT 2018


dkurz accepted this revision.
dkurz added a comment.
This revision is now accepted and ready to land.


  I just discovered by accident that I was named reviewer for the first time. Didn't see it coming!
  
  Please do not drop this patch, as it deduplicates code AND fixes a bug, even if it isn't the one you aimed for.
  
  Every declaration in this method could be const-auto'd, especially the one in line 72, but that would be mixing style changes with functional ones, I guess.

INLINE COMMENTS

> helper.cpp:71
> +    // Color stored in akonadi
> +    if (coll.hasAttribute<Akonadi::CollectionColorAttribute>()) {
>          Akonadi::CollectionColorAttribute *colorAttr

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.

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/20181031/c6ec0a78/attachment.html>


More information about the kde-pim mailing list