Review Request 113260: Port KTimeZoned to Qt5/KF5

John Layt jlayt at kde.org
Sun Oct 20 15:23:56 UTC 2013


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



ktimezoned/ktimezonedbase.h
<http://git.reviewboard.kde.org/r/113260/#comment30665>

    Not generic enough, is Unix specific.  Perhaps timeZoneDatabaseUpdated() without the file path?



ktimezoned/org.kde.KTimeZoned.xml
<http://git.reviewboard.kde.org/r/113260/#comment30664>

    You need to keep this, or a variant of it.


I don't think this is generic enough, it only applies to the zonetab file on Unix, and the data files could be updated without the zonetab being changed, and it doesn't apply to Windows at all.  I'd suggest a generic timeZoneDatabaseUpdated() signal instead that triggers on Unix if any file in the zone path tree (/usr/share/zoneinfo or wherever) is updated, or for Windows if any of the registry database is updated (I can do that later).

- John Layt


On Oct. 18, 2013, 1 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113260/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2013, 1 p.m.)
> 
> 
> Review request for KDE Runtime, KDE Frameworks, Plasma, and John Layt.
> 
> 
> Repository: kde-runtime
> 
> 
> Description
> -------
> 
> Originally I wanted to port KTimeZoned 1:1 to Qt5/KF5, but then I found out that all the stuff KTZD was doing was added in QTimeZone, that includes reading correct system files/env variables to obtain the timezone and returning the proper system zone (KTZD did all this by itself). It also doesn't need to parse the timezone files itself or watch for their changes as QTimeZone objects are not stored.
> 
> So now it's just a thin module watching /etc/timezone (used by Debian-based distros) and /etc/localtime (used by eg. Fedora or Suse, but also by Debian in conjunction with /etc/timezone) for changes and if it detects a change, it checks if the new timezone is really different and if it is, it sends out a DBus signal "timeZoneChange". I changed it from "configChanged" as I think "timeZoneChanged" makes way more sense.
> 
> I didn't touch the Windows part as I have no way to test, would be nice if someone could help with that.
> 
> EDIT: I removed the other two DBus signals which were not used and I'm unsure KTZD is the correct place for that now anyway. The only usage in KSystemTimeZone can be replaced by own KDirWatch instance.
> 
> 
> Diffs
> -----
> 
>   ktimezoned/ktimezoned.cpp f380c09 
>   ktimezoned/ktimezoned.h ff21807 
>   ktimezoned/CMakeLists.txt bafc85e 
>   ktimezoned/ktimezoned_win.h 26e21cc 
>   ktimezoned/ktimezoned_win.cpp cadfe3a 
>   ktimezoned/ktimezonedbase.h ca00aca 
>   ktimezoned/org.kde.KTimeZoned.xml daaa0b7 
> 
> Diff: http://git.reviewboard.kde.org/r/113260/diff/
> 
> 
> Testing
> -------
> 
> Tested by changing the timezone in different ways, change was detected and signalled out.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131020/0fd0a7b8/attachment.html>


More information about the Kde-frameworks-devel mailing list