Review Request: Shares KNS3::Cache amongst its users

Frederik Gladhorn gladhorn at kde.org
Thu Oct 7 16:43:17 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5528/#review8021
-----------------------------------------------------------


The cache is not exported and completely internal, so this is binary compatible.
Instead of making QtSharedPointer::ExternalRefCount<Cache> a friend, you should look into using the QSharedPointer constructor that takes a deleter as parameter.
Apart from that this looks really promising.


/trunk/KDE/kdelibs/knewstuff/knewstuff3/core/cache.h
<http://svn.reviewboard.kde.org/r/5528/#comment8255>

    Not really needed.


- Frederik


On 2010-10-05 13:28:23, Matthias Fuchs wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5528/
> -----------------------------------------------------------
> 
> (Updated 2010-10-05 13:28:23)
> 
> 
> Review request for kdelibs and Frederik Gladhorn.
> 
> 
> Summary
> -------
> 
> Shares the KNS3::Cache amongst every user, thus insuring that it is always consistent.
> This way it can't happen, that e.g. KNS3::DownloadManager updates some KNS3::Entries and a call to KNS3::DownloadWidget later on would overwrite the updated ones as updateable.
> 
> Using shared pointers ensures that the cache is freed ones noone is using it anymore, resulting in less memory usage compared with a static cache.
> 
> NOTE: I am not sure if this is BC, though I think it is as KNS3::Cache is not exported, so please also look at this.
> 
> Bugs that could be related: 181730, 234265, 235680
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/knewstuff/knewstuff3/core/cache.h 1182620 
>   /trunk/KDE/kdelibs/knewstuff/knewstuff3/core/cache.cpp 1182620 
>   /trunk/KDE/kdelibs/knewstuff/knewstuff3/core/engine.h 1182620 
>   /trunk/KDE/kdelibs/knewstuff/knewstuff3/core/engine.cpp 1182620 
> 
> Diff: http://svn.reviewboard.kde.org/r/5528/diff
> 
> 
> Testing
> -------
> 
> Tested it with two instances of the plasma applet comic, having a KNS3::DownloadDialog in both open at the same time.
> Installing in one a new comic, while not doing this in the other.
> This does not update the ui in the other, though this is not target of the patch. Yet since the cache is shared when saving the cache to the hd, both include the newly installed comic.
> 
> 
> Thanks,
> 
> Matthias
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101007/1f52bbc1/attachment.htm>


More information about the kde-core-devel mailing list