<div class="gmail_quote">On Tue, Dec 1, 2009 at 11:46 PM, Milian Wolff <span dir="ltr"><<a href="mailto:mail@milianw.de">mail@milianw.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tuesday 01 December 2009 23:21:24 Aleix Pol wrote:<br>
...<br>
<div class="im"><br>
> > Hm, one thing I forgot:<br>
> > should the IDocumentationProvider returned by m_provider be const? I mean<br>
> > the<br>
> > public API only consists of const stuff, but I still have to const_cast<><br>
> > it<br>
> > before I can return it...<br>
> ><br>
> > And it looks like pointer to providers are used quite often in<br>
> > KDevplatform (the documentation controller esp.).<br>
> ><br>
> > It would require lots of (simple) changes there, just to get rid of a<br>
> > single<br>
> > const_cast - is it worth it?<br>
<br></div></blockquote><div><br>Well, why is the IDocument not interested on the provider being able to  change?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
</div>...<br>
<div class="im"><br>
> What I do in Qt doc is to have a static member with the provider and return<br>
> that one.<br>
> That way every IDocumentation instance doesn't store a pointer to the<br>
> provider (which is shared, of course).<br>
<br>
</div>Yeah, saw that but find it (personally) even worse than the static cast ;-) So<br>
I'll leave it as-is.<br></blockquote><div>I don't see why it's worse, it's cheaper and kind of makes sense to have them all pointing to the same provider.<br>It's just not interface-driven.<br> <br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks Apol.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Milian Wolff<br>
<a href="mailto:mail@milianw.de">mail@milianw.de</a><br>
<a href="http://milianw.de" target="_blank">http://milianw.de</a><br>
</div></div><br>--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
<br></blockquote></div><br>