Missing KCompletionMatches copy operator

Kevin Krammer kevin.krammer at gmx.at
Sun Dec 2 22:17:20 GMT 2007

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.

Ideally Krazy checked.


Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071202/1b54a5cc/attachment.sig>

More information about the kde-core-devel mailing list