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

List:       kde-core-devel
Subject:    Re: kdialogbasebutton?
From:       Michael Matz <matz () ifh ! de>
Date:       2000-10-13 7:36:16
[Download RAW message or body]

Hi,

On Fri, 13 Oct 2000, Mario Weilguni wrote:
> /home/mario/qt2/include/qlist.h: In method `void 
> QList<KDialogBaseButton>::deleteItem(void *)':
> kcookiejar_la_meta_unload.cpp:5:   instantiated from here
> /home/mario/qt2/include/qlist.h:104: invalid use of undefined type `class 
> KDialogBaseButton'

This is because of the "delete (type *) bla;" in QList<type>::deleteItem()
where type is an incomplete type, so the delete operator might not resolve
to the right one (in case type has it's own, which is not the case here).
Normally this should be only a warning, so pgcc does something different
than g++. The correct solution to that is to not define the struct
KDialogBase::SButton in the header file (it's anyway private)m or make the
member "list" a QList<KDialogBaseButton*>. I wanted to do the first in
Trysil, but that would have resulted in a BIC, which I thought wasn't
wanted (if I had known how many BICs found its way in since then, I had
done that). Provided that the size of QList<X> and QList<X*> is the same,
we could do the second as an intermediate solution.

> ment to use, isn't it? The build is from a fresh CVS version from yesterday 
> evening, the compiler is pgcc-2.95.2 19991024

Btw: You only get this with --enable-final? I ask, because also without
that the instantiation of QList<KDialogBaseButton> happens, which should
lead to the same error (and in fact MIPSpro CC gives warnings).


Ciao,
Michael.

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

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