[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: Can IDocumentationProvider::homePage be non-const?
From:       Aleix Pol <aleixpol () kde ! org>
Date:       2009-12-01 23:14:35
Message-ID: 757d9a550912011514s506c3acemacf357ab75ec8fd3 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Tue, Dec 1, 2009 at 11:46 PM, Milian Wolff <mail@milianw.de> wrote:

> 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?
>
>
Well, why is the IDocument not interested on the provider being able to
change?


> ...
>
> > 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.
>
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.
It's just not interface-driven.


>
> Thanks Apol.
>
> --
> Milian Wolff
> mail@milianw.de
> http://milianw.de
>
> --
> KDevelop-devel mailing list
> KDevelop-devel@kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>

[Attachment #5 (text/html)]

<div class="gmail_quote">On Tue, Dec 1, 2009 at 11:46 PM, Milian Wolff <span \
dir="ltr">&lt;<a href="mailto:mail@milianw.de">mail@milianw.de</a>&gt;</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>
&gt; &gt; Hm, one thing I forgot:<br>
&gt; &gt; should the IDocumentationProvider returned by m_provider be const? I \
mean<br> &gt; &gt; the<br>
&gt; &gt; public API only consists of const stuff, but I still have to \
const_cast&lt;&gt;<br> &gt; &gt; it<br>
&gt; &gt; before I can return it...<br>
&gt; &gt;<br>
&gt; &gt; And it looks like pointer to providers are used quite often in<br>
&gt; &gt; KDevplatform (the documentation controller esp.).<br>
&gt; &gt;<br>
&gt; &gt; It would require lots of (simple) changes there, just to get rid of a<br>
&gt; &gt; single<br>
&gt; &gt; 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>
&gt; What I do in Qt doc is to have a static member with the provider and return<br>
&gt; that one.<br>
&gt; That way every IDocumentation instance doesn&#39;t store a pointer to the<br>
&gt; 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&#39;ll leave it as-is.<br></blockquote><div>I don&#39;t see why it&#39;s \
worse, it&#39;s cheaper and kind of makes sense to have them all pointing to the same \
provider.<br>It&#39;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>



--
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic