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

Kai Uwe Broulik kde at privat.broulik.de
Sun Aug 14 09:49:19 UTC 2016


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

(Updated Aug. 14, 2016, 9:49 a.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma.


Changes
-------

Submitted with commit 97a3611c165b154211344336d99973391023c057 by Kai Uwe Broulik to branch master.


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/20160814/8ddcef82/attachment-0001.html>


More information about the Plasma-devel mailing list