Bug 236874 - plasma calendar: date never changes when placed in panel
Summary: plasma calendar: date never changes when placed in panel
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-clock (show other bugs)
Version: 4.9.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 294300 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-08 17:48 UTC by missive
Modified: 2018-06-08 18:15 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
proposed patch (1.08 KB, patch)
2013-04-17 05:32 UTC, oojmj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description missive 2010-05-08 17:48:54 UTC
Version:           4.4.2 (using KDE 4.4.2)
OS:                Linux
Installed from:    Ubuntu Packages

I have a calendar plasmoid in my panel, but the date never changes.

I've tried removing the plasmoid and re-adding it, and restarting KDE, but the problem persists.

Otherwise, it seems to be working. When I click on it the calendar pops up, and today is highlighted with a white border, but the day number shown on the little calendar page on the panel still shows the day that I logged in.
Comment 1 Aaron J. Seigo 2010-05-09 00:37:13 UTC
SVN commit 1124348 by aseigo:

an optimization in the constraints event broke this; fix it
BUG:236874


 M  +1 -1      calendar.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1124348
Comment 2 Aaron J. Seigo 2010-05-09 00:39:26 UTC
SVN commit 1124349 by aseigo:

an optimization in the constraints event broke this; fix it
CCBUG:236874


 M  +1 -1      calendar.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1124349
Comment 3 missive 2010-08-11 20:36:33 UTC
Is this fix in 4.5.0? I upgraded and the calendar still gets stuck on the date of login.
Comment 4 missive 2010-08-13 19:23:09 UTC
Looks like this was applied to what is now 4.5, so something is still not quite right.
Comment 5 kxenator 2010-09-13 17:46:29 UTC
I can confirm the reported behaviour. Using KDE 4.5.1 (Opensuse 11.3).
Comment 6 Robby Stephenson 2010-11-11 15:50:11 UTC
I know that "me too" comments aren't always helpful, but I thought I'd add my note anyway. I see this problem with KDE 4.5.3 and opensuse RPMs, too. It's a minor annoyance to have the wrong date there, but an annoyance nonetheless.

What's the best way to help debug this?
Comment 7 missive 2011-05-10 02:36:13 UTC
Just a note that this is still broken in 4.6.2
Comment 8 kxenator 2011-09-29 09:29:24 UTC
Still broken in 4.7.1. Please, resolve this bug, it's really annoying.
Comment 9 missive 2012-05-18 12:09:20 UTC
Still broken in 4.8.2
Comment 10 Myriam Schweingruber 2012-05-19 22:15:31 UTC
Setting status correctly to confirmed.
Comment 11 Anne-Marie Mahfouf 2012-06-05 06:32:43 UTC
Calendar icon in panel still does not update to the correct day in 4.8.80 while the calendar itself gets correctly updated.
Comment 12 Anne-Marie Mahfouf 2012-06-06 19:24:16 UTC
*** Bug 294300 has been marked as a duplicate of this bug. ***
Comment 13 Aaron J. Seigo 2012-06-14 11:48:27 UTC
Git commit 4a07e2a92f23f4364d7a8fae7ff1ab1647a4d749 by Aaron Seigo.
Committed on 14/06/2012 at 13:46.
Pushed by aseigo into branch 'master'.

try to get the date updating properly

the updateDate and paintIcon code all work properly, which leaves us with
something odd with the qtimer .. i've probably done more than necessary, but...

this does have one deliterious effect: it will wake up once per hour instead of trying
to only wake up once per day. so be it.

M  +18   -2    plasma/generic/applets/calendar/calendar.cpp
M  +3    -3    plasma/generic/applets/calendar/calendar.h

http://commits.kde.org/kde-workspace/4a07e2a92f23f4364d7a8fae7ff1ab1647a4d749
Comment 14 kxenator 2012-08-04 10:26:24 UTC
Could somebody please reopen this bug? I have still the same problem in KDE 4.9. Can anyone else confirm that this bug is still in KDE 4.9?
Comment 15 Christian Saemann 2012-08-22 13:35:35 UTC
I also have the same problem in KDE 4.9.0.559 (openSUSE rpms)
Comment 16 Myriam Schweingruber 2012-09-08 11:36:48 UTC
Reopening based on comments #14 and 15
Comment 17 missive 2012-10-20 12:17:20 UTC
Still not working in 4.9.2.
Comment 18 Daniel Phillips 2013-03-27 15:56:41 UTC
Also in 4.9.5
Comment 19 oojmj 2013-04-17 05:32:19 UTC
Created attachment 78976 [details]
proposed patch

Here is a proposed patch.
The main problem isn't with the QTimer.
The problem is that paintIcon() is using the *selected* date on the calendar, not the *current* date. The patch is against the code before the attempted fix that didn't actually fix the issue. This works, as long as the QTimer isn't interrupted and there's no "odd clock drifting".

That said, the QTimer does have secondary issues. It doesn't account for things it was never written to account for, like being installed on a laptop where the user closes the lid and the system suspends/hibernates.
This patch fixes the issue, but I'm not going to be using the widget because there's too much overhead for me right now to figure out things like "notification of resume after suspend" ( https://bugs.kde.org/show_bug.cgi?id=217772, https://drfav.wordpress.com/2010/11/10/updates-from-kde-power-management-land-for-users-and-developers/).
Anyway, hope this helps someone.
Comment 20 Mark Visser 2016-08-31 14:00:30 UTC
This bug is still present in KDE 4.10.5 (ships with RHEL/CentOS 7.2).

oojmj@99experts.com is correct, the widget updates to the date selected in the calendar, not the current date. 

As it stands now, the calendar widget is unusable.
Comment 21 Gno Gname 2016-10-30 01:42:46 UTC
This bug seems still present in KDE 4.11.19 (ships with RHEL/CentOS 7.2.1511).

'Tis a shame because calendar worked so nicely in KDE 4.3.4 (ships with RHEL/CentOS 6.8)

:-(
Comment 22 Nate Graham 2018-06-08 18:15:09 UTC
Hello!

This bug report was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this bug has already been resolved in Plasma 5.

Accordingly, we hope you understand why we must close this bug report. If the issue described  here is still present in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham