reviewboard hates me
Boudewijn Rempt
boud at valdyas.org
Mon Oct 3 07:58:20 BST 2011
On Monday 03 October 2011 Oct, Thorsten Zachmann wrote:
> On Saturday, October 01, 2011 09:58:50 Boudewijn Rempt wrote:
> > It doesn't want to accept this patch, which I think needs at least a quick
> > eyeballing from others. Please find it attached.
> >
> > It's about splitting KoResourceManager:
> >
> >
> > KoResourceManager was used in two places: the canvas and document
> > classes. This gave rise to endless confusion about which resource
> > manager should be used where and contains what. The KoResourceManager
> > api also contained methods that were only relevant when used from
> > a document and others that were only relevant when used from a canvas.
> >
> > This patch splits the resourcemanager into two public and one private
> > class. The public classes are KoDocumentResourceManager and
> > KoCanvasResourceManager, the private class is KoResourceManager. The
> > public classes defer to the private class for code-sharing purposes.
> >
> > The old KoCanvasResource and KoDocumentResource enums have been taken
> > into the classes themselves.
>
> I think it would be good to have the same base class for both the
> KoDocumentResourceManager and the KoCanvasResourceManager as they both work
> the same way. That will reduce code duplication.
>
> Why not use the KoResourceManager as base class instead of a private member?
Because I did not want it to be possible at all to cast one into the other, or to code against the base class anywhere.
--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
More information about the calligra-devel
mailing list