Review Request: Offer create private/protected members when possible in missingdeclarationaction
Aleix Pol Gonzalez
aleixpol at gmail.com
Mon Dec 12 22:27:49 UTC 2011
> On Dec. 12, 2011, 9:10 p.m., Aleix Pol Gonzalez wrote:
> > Hi, sorry that it took us so long to answer.
> >
> > I'm not proficient in this code but: isn't it too much code if we're just adding different visibility types?
> > Maybe you can find a cleaner solution?
> >
> > Anyway, Milian or David will know better than I would.
>
> Jonas Jacobi wrote:
> mhh it's like 20 lines of code and you have to determine what visibility types are applicable, so i don't see it getting much better. although i have to admit that i was (am) absolutely new to the current kdevelop/duchain when i wrote this, so maybe i missed something.
You're right. I misread the patch. I don't know why reviewboard shows so much stuff.
Nothing against then, still let's wait to see what others think about it.
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102625/#review8899
-----------------------------------------------------------
On Sept. 17, 2011, 8:28 a.m., Jonas Jacobi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102625/
> -----------------------------------------------------------
>
> (Updated Sept. 17, 2011, 8:28 a.m.)
>
>
> Review request for KDevelop.
>
>
> Description
> -------
>
> Currently only public member variables can be declared in some contexts.
> This patch checks whether private/protected members would be also accessible from the current context (disregarding friend declarations atm)
> and if so, offer the possibility to create the members.
> e.g.
>
> class A {
> public:
> A(int x) : mUndeclared(x) {} // <- declare mUndeclared as private/protected/public member
> };
>
> class B : public A {
> public:
> void foo() {
> A a(2);
> a.undeclared = 5; // <- declare undeclared as protected/public
> }
> };
>
> class X {
> public:
> void bar() {
> B b;
> b.undeclared = 5; // <- declare undeclared as public
> }
> };
>
>
> Diffs
> -----
>
> languages/cpp/cppduchain/missingdeclarationassistant.cpp bafc159
>
> Diff: http://git.reviewboard.kde.org/r/102625/diff/diff
>
>
> Testing
> -------
>
> I'm currently using it
>
>
> Thanks,
>
> Jonas Jacobi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20111212/adbfcd67/attachment.html>
More information about the KDevelop-devel
mailing list