Bug 89075

Summary: Create member function adds implementation before the initial copyright comment.
Product: [Applications] kdevelop Reporter: Tobias Erbsland <bugs.kde.org>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED WORKSFORME    
Severity: normal CC: bluedzins, jens.dagerbo
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tobias Erbsland 2004-09-08 14:26:23 UTC
Version:           3.1.0 (using KDE KDE 3.3.0)
Installed from:    SuSE RPMs
OS:                Linux

When i create the implementation of a member by pressing (F2), the implementation of the member is added before the initial comment of the cpp file.

That happens when the cpp file wasn't open or the cursor war at the beginning of the file:

/**
  ..copyright blabla..
*/

Hit F2 on the member in the h file:

void Foo::foo()
{
}/**
  ..copyright blabla..
*/

The initial comment should always skipped befor inserting an implementation.
Comment 1 Jens Dagerbo 2004-09-08 18:32:37 UTC
Was the .cpp file completely empty (no other methods defined) before?
Comment 2 Tobias Erbsland 2004-09-08 19:52:33 UTC
No, the Constructor and the Deconstructor were already in the implementation file.

I'd compiled kdevelop from HEAD today, i'll re-check that with the HEAD version.
Comment 3 Tobias Erbsland 2004-09-09 12:53:02 UTC
The problem occours in the HEAD version too.
Comment 4 Jens Dagerbo 2004-09-09 21:03:18 UTC
Duplicate.

*** This bug has been marked as a duplicate of 70244 ***
Comment 5 Tobias Erbsland 2004-09-10 10:42:03 UTC
This isn't a duplicate of 70244 IMHO...
Comment 6 Jens Dagerbo 2004-09-10 18:15:40 UTC
I'm guessing a solution to one would solve both, but I guess you could be right.

Reopen. Sigh.
Comment 7 greatbunzinni 2005-09-18 13:18:57 UTC
This bug also happens with KDevelop 3.2.1. It places the member implementation text above the automatic licensing comment that KDevelop inserts in the source files.
Comment 8 Andreas Pakulat 2007-11-30 20:26:25 UTC
I can't reproduce this with KDevelop 3.5, is this bug still present?
Comment 9 Andreas Pakulat 2008-07-05 22:20:07 UTC
this works just fine for me in latest kdevelop. closing.