Review Request: Modify Calendar Data Engine to not use multiple keys

John Layt johnlayt at googlemail.com
Thu Jun 10 11:56:03 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4273/
-----------------------------------------------------------

Review request for Plasma.


Summary
-------

Remove use of insertMulti() by changing "holidays" data request to return a list instead of a hash.  Holidays don't really have a unique key, neither date nor name are unique, so a list of objects with attributes better matches the data than a hash.  The date is simply another attribute of the holiday rather than being the key (with more attributes to come in 4.6).

Alternatives:
* Keep the hash with date as key, with a nested list of holidays for that date as the value, which just seems over-complex to set-up and read.
* Keep the hash but with a random meaningless key and the date as an attribute, which is really just another name for a list.


Diffs
-----

  trunk/KDE/kdebase/workspace/libs/plasmaclock/calendartable.cpp 1136478 
  trunk/KDE/kdebase/workspace/plasma/generic/dataengines/calendar/calendarengine.h 1136478 
  trunk/KDE/kdebase/workspace/plasma/generic/dataengines/calendar/calendarengine.cpp 1136478 

Diff: http://reviewboard.kde.org/r/4273/diff


Testing
-------

Calendar plasmoid displays multiple holidays on same day with distinction between days-off and days-on.


Thanks,

John



More information about the Plasma-devel mailing list