Can IDocumentationProvider::homePage be non-const?
Milian Wolff
mail at milianw.de
Tue Dec 1 22:46:57 UTC 2009
On Tuesday 01 December 2009 23:21:24 Aleix Pol wrote:
...
> > Hm, one thing I forgot:
> > should the IDocumentationProvider returned by m_provider be const? I mean
> > the
> > public API only consists of const stuff, but I still have to const_cast<>
> > it
> > before I can return it...
> >
> > And it looks like pointer to providers are used quite often in
> > KDevplatform (the documentation controller esp.).
> >
> > It would require lots of (simple) changes there, just to get rid of a
> > single
> > const_cast - is it worth it?
...
> What I do in Qt doc is to have a static member with the provider and return
> that one.
> That way every IDocumentation instance doesn't store a pointer to the
> provider (which is shared, of course).
Yeah, saw that but find it (personally) even worse than the static cast ;-) So
I'll leave it as-is.
Thanks Apol.
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- 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/kdevelop-devel/attachments/20091201/387f7e42/attachment.sig>
More information about the KDevelop-devel
mailing list