Review Request 114478: Add kshareddatacache.h include

Alex Merry kde at randomguy3.me.uk
Tue Dec 17 17:30:33 UTC 2013



> On Dec. 15, 2013, 9:22 p.m., Kevin Ottens wrote:
> > It is in fact intended that way as kguiaddons isn't supposed to include stuff coming from kcoreaddons (yeah I know it's slightly convoluted in that particular case).
> 
> Albert Astals Cid wrote:
>     So basically we have a header that when you include it, it breaks your compilation. Do you really think this is a good idea?
> 
> Alex Merry wrote:
>     If KSharedPixmapCacheMixin is never intended to be used directly, but only via KImageCache, I think we should really have the #include; not having KGuiAddons depend on KCoreAddons is one thing, but that header is useless without KSharedDataCache.
>     
>     Essentially, the current way is broken unless you add a non-obvious KSharedDataCache include to your code, regardless of whether you have KCoreAddons added to your project.  Albert's suggestion would make the common case work (where you have KCoreAddons).
>     
>     Of course, there are other tricks you could pull, such as having the KF5::CoreAddons target add -DHAS_K_SHARED_DATA_CACHE to the compiler flags, and only do the #include in the presence of that define.
> 
> Kevin Ottens wrote:
>     I actually like this last suggestion.

Something for after the split, though.


- Alex


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


On Dec. 15, 2013, 4:15 p.m., Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114478/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2013, 4:15 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> Since
> #define KImageCache KSharedPixmapCacheMixin<KSharedDataCache>
> I think it is only fair that kimagecache.h includes kshareddatacache.h otherwise a 
> #include <kimagecache.h>
> is not enough to use it.
> 
> 
> Diffs
> -----
> 
>   tier1/kguiaddons/src/util/kimagecache.h 682aa66 
> 
> Diff: http://git.reviewboard.kde.org/r/114478/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Albert Astals Cid
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131217/6ecdf6d0/attachment.html>


More information about the Kde-frameworks-devel mailing list