KDE/kdevplatform/shell

Milian Wolff mail at milianw.de
Tue Jul 21 17:41:24 UTC 2009


Am Dienstag, 21. Juli 2009 19:24:16 schrieb Andreas Pakulat:
> On 21.07.09 12:48:10, Milian Wolff wrote:
> > Am Dienstag, 21. Juli 2009 07:23:09 schrieb Andreas Pakulat:
> > > On 19.07.09 13:26:37, Milian Wolff wrote:
> > > > SVN commit 999227 by mwolff:
> > > >
> > > > fix warning for copy constructor not initializing base class QObject.
> > > >
> > > > I first wanted to do : QObject(rhs) but that is private :-/ hope this
> > > > fix is correct.
> > >
> > > We should never have a public/private/protected copy constructor for
> > > any QObject based class. That doesn't make the slightest sence. For
> > > example this one will loose the connection to the parent and hence will
> > > create a memory leak.
> >
> > so what should I do?
>
> Well, look at other exported classes how they handle slots (I know we have
> some other places to cleanup). For example projectcontroller.h in shell/.
>
> Also checkout the C++ Binary Compat FAQ on techbase.kde.org:
> http://techbase.kde.org/Policies/Library_Code_Policy
> http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++

anderres in IRC explained to my why QObject descendants should never get copy 
and assigment ctors. Looking at the code I realized that it is dead anyways 
and already wrote a mail to Zwabel with question if I can remove it.

Regarding dead code:

- copy ctor is only used in clone() method
- clone() method is never used


The copy ctor looks pretty incomplete anyways.

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090721/6ad5dd2a/attachment.sig>


More information about the KDevelop-devel mailing list