Review Request 128648: [Calendar DaysModel] Don't call layoutChanged() and emit dataChanged() with roles

Kai Uwe Broulik kde at privat.broulik.de
Wed Aug 10 13:33:06 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128648/
-----------------------------------------------------------

Review request for Plasma.


Repository: plasma-framework


Description
-------

LayoutChanged causes QML to destroy all delegates and re-create them. Since the number of days doesn't change but only the numbers, we can just call dataChanged on all roles.

Furthermore, when agenda-related data changes, only the containsEventItems role might have changed, so only emit a change for it.


Diffs
-----

  src/declarativeimports/calendar/daysmodel.cpp 169711e 

Diff: https://git.reviewboard.kde.org/r/128648/diff/


Testing
-------

Scrolling through the calendar still properly updates the day numbers, the selected day and "today" marker as well as the "has event items" badge.

Scrolling quickly through the calendar is now pretty fast and smooth but the initial lag when opening the calendar for the first time is still there.


Thanks,

Kai Uwe Broulik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160810/38462743/attachment.html>


More information about the Plasma-devel mailing list