kimagecache.h

Kevin Ottens ervin at kde.org
Thu Dec 26 16:42:42 UTC 2013


Hello,

On Thursday 26 December 2013 15:47:49 Alex Merry wrote:
> Another decision to be made :-)
> 
> kimagecache.h, in KGuiAddons, includes the template class
> KSharedPixmapCacheMixin and the line
> #define KImageCache KSharedPixmapCacheMixin<KSharedDataCache>
> 
> Using KImageCache will clearly not work without the header that defines
> KSharedDataCache, which is in kcoreaddons.  Currently, this means users
> of KImageCache have to include ksharedatacache.h as well as
> kimagecache.h, which is less than ideal.
> 
> There are three possible solutions that I see to this:
> 1. just #include <kshareddatacache.h> in kimagecache.h, on the basis
> KImageCache is useless without linking against KCoreAddons anyway
> 
> 2. do some CMake magic to only do (1) if the current target is linked to
> KF5::CoreAddons
> 
> 3. move KImageCache to another framework that depends on KCoreAddons
> 
> Bear in mind that we can put KSharedPixmapCacheMixin its own header if
> we actually think it might be useful independent of KSharedDataCache.
> 
> I would argue against (2), on the basis that it would break things for
> any users that do not use CMake, and that sort of magic is fairly
> fragile.  (1) is, I think, a better solution than (2).
> 
> aacid has advocated (3) (see http://git.reviewboard.kde.org/r/114478/),
> although we would have to figure out *which* framework to put it in.

That's the problem with (3), there's no good framework for KImageCache beside 
KGuiAddons.

> What do you think is the best solution?

I think your point against (2) is fair, although I don't fancy it much let's 
go for (1) then as the "least bad" solution.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131226/0b787888/attachment.sig>


More information about the Kde-frameworks-devel mailing list