Bug 255038

Summary: KDevelop adds unnecessary initializations when I inherit from boost::enable_shared_from_this
Product: [Applications] kdevelop Reporter: Nikita Churaev <lamefun.x0r>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.0.2   
Target Milestone: 4.1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nikita Churaev 2010-10-23 15:11:40 UTC
Version:           4.0.2 (using KDE 4.5.2) 
OS:                Linux

Like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noob.hpp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#include <boost/enable_shared_from_this.hpp>
#include "woot.hpp"

namespace bugland
{

class noob :
  boost::enable_shared_from_this<noob>
{
public:
  noob(const bugland::woot& woot, int wootage_factor);
}

} // namespace bugland


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noob.cpp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#include "noob.hpp"

namespace bugland
{

~~ implementation helper's version: ~~

noob::noob(const bugland::woot& woot, int wootage_factor) : boost::enable_shared_from_this<bugland::noob> (woot, wootage_factor)
{

}

~~ correct: ~~

noob::noob(const bugland::woot& woot, int wootage_factor)
{

}

} // namespace bugland


Reproducible: Always
Comment 1 Milian Wolff 2010-12-08 22:05:55 UTC
confirmed
Comment 2 Dmitry 2011-03-28 23:25:41 UTC
Git commit 27d84da5ccd966b2cfc760af9d3775a2fd6f8582 by Dmitry Risenberg.
Committed on 22/03/2011 at 23:26.
Pushed by risenberg into branch 'master'.

Respect base class constructor arguments when code-completing a constructor.

REVIEW: 100924
BUG: 255038

M  +2    -5    languages/cpp/codecompletion/context.cpp     
M  +63   -24   languages/cpp/codecompletion/implementationhelperitem.cpp     
M  +45   -1    languages/cpp/tests/test_cppcodecompletion.cpp     
M  +2    -1    languages/cpp/tests/test_cppcodecompletion.h     

http://commits.kde.org/kdevelop/27d84da5ccd966b2cfc760af9d3775a2fd6f8582