D12438: Fix PlasmaCalendar widget to not mark days with minor events

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed May 2 15:25:26 UTC 2018


kossebau marked an inline comment as done.
kossebau added inline comments.

INLINE COMMENTS

> broulik wrote in daysmodel.cpp:223
> `std::find_if`

Tried, but seems there is no simple way to use std::find_if or std::any_of algorithms here for the usecase of checking all values for a given key in a QMultiHash. The algorithms all only take fixed first and last iterators, so one first has to estimate the last iterator by something like std::equal_range, which as result means iterating 2x over the entries and does not make the code more comprehensible to the reader.
So as discussed on irc staying with current code for now.

> davidedmundson wrote in DayDelegate.qml:105
> surely this should be model !== undefined && model.contains
> 
> otherwise we're doing a filter twice.

Haven't got the complete picture on this code, the purpose of 18af8703039390de8b803a7a9b3c5cfe48f70b7a <https://phabricator.kde.org/R242:18af8703039390de8b803a7a9b3c5cfe48f70b7a> leaves me slightly puzzled, so better to be done separately, cannot yet oversee the potential side effects.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  fixdisplayofminorevents

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

To: kossebau, #plasma, broulik, davidedmundson
Cc: davidedmundson, broulik, #frameworks, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180502/0ff4397e/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list