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

List:       kdevelop-bugs
Subject:    [Bug 224835] Creating constructor via Ctrl+space inserts broken code
From:       "Olivier.jg" <olivier.jg () gmail ! com>
Date:       2010-01-30 4:18:29
Message-ID: 20100130041829.7E97931AE7 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=224835


Olivier.jg <olivier.jg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olivier.jg@gmail.com




--- Comment #1 from Olivier.jg <olivier jg gmail com>  2010-01-30 05:18:28 ---
@David:
This is a problem with the findDeclarationsInternal on ducontext.cpp:828 it
seems (as called from StripPrefixes).
When given Foo::Foo as the identifier, it loops through each part of the id and
finds the class Foo instead of the function Foo, and then returns on line 842.
The reason it appears ok in the box that pops up offering the completion is
because StripPrefixes is called on the parentScope of the function (Foo), not
on the function itself (Foo::Foo).

Interestingly (but not exactly related), this doesn't happen if you try to
implement it at the end of the file. This is because findContextAt, called on
implementationhelperitem.cpp:176, returns a null context at that cursor
position. No context, no stripping.

Sorry I can't help more (like actually fix something), I'm having to cram in
some extra work these days.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

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