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

List:       kde-core-devel
Subject:    Re: Missing KCompletionMatches copy operator
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2007-12-03 16:53:36
Message-ID: 47543490.8010709 () gmx ! de
[Download RAW message or body]


Kevin Krammer schrieb:
> On Sunday 02 December 2007, Andreas Pakulat wrote:
>> On 02.12.07 22:26:14, Christian Ehrlicher wrote:
>>> Hi,
>>>
>>> due to a missing copy operator I get a crash (on windows) when konqueror
>>> tries to display historyPopupCompletionItems.
>>> It happens because msvc (don't know if/how this works with gcc) creates
>>> a default copy ctor which does not copy the d-ptr correctly -> double
>>> free d-ptr -> crash.
>>>
>>> Afaics therer are also other classes which have d-ptr but no copy ctor
>>> (at least KCompletionBase and KCompletion).
>> KCompletion can't be copied (its a QObject subclass) and as far as I can
>> see KCompletionBase is not used as value type thus no need for a copy
>> constructor or assignment operator.
> 
> I'd say whenever a class has a pointer member, it should either have 
> Q_DISABLE_COPY or copy constructor and assignment operator.
> 
I found some more where the copy ctor/Q_DISABLE_COPY seems missing:

kdeui/util/kwordwrap.h
kdeui/util/kxerrorhandler.h
kdecore/compression/kfilterbase.h
kdecore/date/*.h
kdecore/localization/kcharsets.h ?
kwallet/backend/kwalletbackend.h

But I don't know how a krazy check can find this problems.

Christian



["signature.asc" (application/pgp-signature)]

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

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