Problem with qabstractitemdelegate.h

Simon Hausmann hausmann at kde.org
Wed May 2 09:39:53 BST 2007


On Wednesday 02 May 2007 08:52:10 Christian Ehrlicher wrote:
> Von: Simon Hausmann <hausmann at kde.org>
>
> > On Wednesday 02 May 2007 07:02:19 Christian Ehrlicher wrote:
> > > Hi,
> > >
> > > I already sent this issue to qt-bugs at trolltech some weeks ago and they
> > > told me to fix it but without success.
> > > The ctors need to be private - otherwise I'll get linker errors in
> > > libkdegames. I don't think this will break BC because you can't link
> > > against those two functions (when you try you'll get a linker error).
> > > Another solution would be to implement dummy functions for them.
> > >
> > > Can someone add this patch to qt-copy?
> >
> > Making the constructor that takes a QObjectPrivate private looks wrong to
> > me,
> > it needs to be protected for the QItemDelegate subclass in Qt (did you
> > try to
> > compile Qt after your change? it should break compilation).
>
> You're right - only Q_DISABLE_COPY(QAbstractItemDelegate) has to be
> private. Sorry for the wrong patch.
>
> > But I'm not in favor of just blindly applying this patch. Can you tell us
> > the
> > qt-bugs issue number you got for the problem? What special thing is
> > libkdegames doing that this problem shows up only now?
>
> I can tell you the issue number this evening.
>
> The problem is imho that in libkdegames a class derives from
> QAbstractItemDelegate and then is exported. Because of this msvc
> automatically creates a copy ctor (don't know why it's not created when the
> one from the derived class is private, but that's how it looks to me) and
> fails because the one from QAbstractItemDelegate is not available.

Agreed. Patch submitted to 4.3 and qt-copy.

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070502/23d5d2e1/attachment.sig>


More information about the kde-core-devel mailing list