Bug 440627

Summary: A pinned calendar displays the wrong number of dots
Product: [Plasma] plasmashell Reporter: popov895 <popov895>
Component: Digital ClockAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: carl, nate, popov895
Priority: NOR    
Version: 5.22.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.86
Attachments: Dots on days tab
Dots on months tab

Description popov895 2021-08-05 09:15:34 UTC
Created attachment 140539 [details]
Dots on days tab

SUMMARY

A pinned calendar displays a different number of dots every time you open its settings dialog. At first I thought this problem only related to my openSUSE Tumbleweed, but after switching to KDE neon, it appeared here as well.

After a little research, I came up with some information:
* the number of dots changes only for days with events
* dots are also displayed on the months tab because the day cell has no clipping
* the number of dots always changes cyclically: 0 => real number of events => 42 => 0 => ... (the number 42 is most likely related to the number of days displayed on the days tabs)
* looks like every new opening of the settings dialog affects how the DelegateModel calculates the rootIndex (https://invent.kde.org/frameworks/plasma-framework/-/blob/master/src/declarativeimports/calendar/qml/DayDelegate.qml#L84)

STEPS TO REPRODUCE

1. Open Digital Clock applet
2. Check "Keep Open" button in the top right corner
3. Open Settings dialog (clicking "Configure Digital Clock..." button or menuitem with the same name in the context menu) and close it
4. Repeat step 3 several times

SOFTWARE/OS VERSIONS

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-25-generic (64-bit)
Graphics Platform: X11
Comment 1 popov895 2021-08-05 09:16:21 UTC
Created attachment 140540 [details]
Dots on months tab
Comment 2 Nate Graham 2021-08-05 14:04:56 UTC
Huh, I thought we had fixed this. :(

If it's reproducible and you've already dug into the code, please feel free to submit a merge request.
Comment 3 popov895 2021-08-05 15:47:34 UTC
Is it just me again?
Comment 4 Bug Janitor Service 2021-08-06 19:42:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/309
Comment 5 Bug Janitor Service 2021-08-07 08:55:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/310
Comment 6 Nate Graham 2021-08-09 15:56:06 UTC
Git commit 19fe24ef9377178413438d7749630053995af229 by Nate Graham, on behalf of Eugene Popov.
Committed on 09/08/2021 at 15:56.
Pushed by ngraham into branch 'master'.

[Calendar] Fix pinned calendar displaying the wrong number of dots

Use assignment instead of binding for the rootIndex property of the DelegateModel.
FIXED-IN: 5.86

M  +2    -1    src/declarativeimports/calendar/qml/DayDelegate.qml

https://invent.kde.org/frameworks/plasma-framework/commit/19fe24ef9377178413438d7749630053995af229