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

List:       kdevelop-bugs
Subject:    [Bug 305742] New: Creating a constructor implementation should automatically add initializer list fo
From:       Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date:       2012-08-24 19:54:18
Message-ID: bug-305742-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

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

            Bug ID: 305742
          Severity: wishlist
           Version: 4.3.1
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: Creating a constructor implementation should
                    automatically add initializer list for const members
    Classification: Unclassified
                OS: Linux
          Reporter: kde@opensource.sf-tec.de
          Hardware: openSUSE RPMs
            Status: NEW
         Component: code completion
           Product: kdevelop

Guess I have a class that looks like this:

class Foo : public QObject {
...
Foo(QObject *parent);

FooPrivate * const d_ptr;
const QString m_something;
};

When I now create an implementation for the constructor using the code
completion I will get something like this:

Foo::Foo(QObject *parent) : QObject(parent)
{
}

The initializer list should also contain d_ptr and m_something, as they can
only be ever written to in this initilizer list.

You will score extra karma points if the completion for pointers, at least for
a <classname>Private pointer will not just be d_ptr(), but d_ptr(new
type_of_pointer()).

You will score incredible karma if you also fill in some useful values for all
this initializers, i.e. matching constructor arguments. And if a
<classname>Private object has a <classname> argument then just add a "this" at
that position.

Reproducible: Always

-- 
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