[Kde-pim] Review Request: Use hashes in the SingleFileResource take two.
Kevin Krammer
kevin.krammer at gmx.at
Fri Jul 10 12:49:28 BST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/965/#review1521
-----------------------------------------------------------
trunk/KDE/kdepim/akonadi/resources/shared/singlefileresource.h
<http://reviewboard.kde.org/r/965/#comment948>
might be better to have an explizit initialization template method to avoid parsing the file even if the hash matches.
trunk/KDE/kdepim/akonadi/resources/shared/singlefileresource.h
<http://reviewboard.kde.org/r/965/#comment949>
Maybe also delete the stored hash
trunk/KDE/kdepim/akonadi/resources/shared/singlefileresourcebase.h
<http://reviewboard.kde.org/r/965/#comment950>
This sounds a bit too much like a signal name.
The subclass might also need to know about the contextt, e.g. a hash change due to it saving the file might be just informational, a change which will trigger a reload might
trunk/KDE/kdepim/akonadi/resources/shared/singlefileresourcebase.cpp
<http://reviewboard.kde.org/r/965/#comment951>
It could be of interest to the subresource to access the same runtime config without having to know how the filename is constructed
- Kevin
On 2009-07-09 06:50:32, Bertjan Broeksema wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/965/
> -----------------------------------------------------------
>
> (Updated 2009-07-09 06:50:32)
>
>
> Review request for KDE PIM, Kevin Krammer and Volker Krause.
>
>
> Summary
> -------
>
> Second stab at using hashes. This patch makes sure that the has of a file gets saved after a write in a config file. This makes it possible to check if the file has changed between to cold starts of a resource.
>
> If the hash has changed, synchronize is called but first clearCache() as we have to assume that the information that might be/is cached is invalid by now.
>
>
> Diffs
> -----
>
> trunk/KDE/kdepim/akonadi/resources/shared/singlefileresourcebase.cpp 993641
> trunk/KDE/kdepim/akonadi/resources/shared/singlefileresourcebase.h 993641
> trunk/KDE/kdepim/akonadi/resources/shared/singlefileresource.h 993641
>
> Diff: http://reviewboard.kde.org/r/965/diff
>
>
> Testing
> -------
>
> Did some testing with the mbox resource:
> - Changing file between two cold starts -> changed hash correctly detected, DeleteItemOffsets attribute got deleted by clearCache()
> - Changing file while mbox is running -> same results.
> - Not changing the file between two cold starts -> no synchronize() called.
>
>
> Thanks,
>
> Bertjan
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list