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

List:       kde-core-devel
Subject:    Re: kdialogbase.h
From:       Harri Porten <harri () trolltech ! com>
Date:       2000-08-12 13:59:03
[Download RAW message or body]

Espen Sand wrote:
> 
> On Sat, 12 Aug 2000,  Harri Porten wrote:
> > Package: kdelibs
> > Version: CVS 20000812
> >
> > Thomas Leitner reported a warning issued by his compiler when including
> > kdialogbase.h.
> >
> > > Here's a small annoyance with QT 2.2 beta 1 and the Compaq C++ Compiler
> > > under Tru64 (osf1-cxx-shared config):
> > >
> > > cxx -DHAVE_CONFIG_H -I. -I. -I.. -I../dcop -I../kdecore -I../kdeui
> > > -I/home6/kde2d/qt-copy/include -I. -I/usr/local/kde2/include
> > > -I/usr/local/include -std gnu -O2 -DAES_SOURCE -D__USE_STD_IOSTREAM
> > > -D__STDC__=1 -D__DECC__ -I /home6/kde2d/cxxinc -DQT_CLEAN_NAMESPACE
> > > -DQT_NO_COMPAT -DQT_NO_ASCII_CAST -c kpassdlg.cpp   -DPIC -o
> > > .libs/kpassdlg.o
> > > cxx: Warning: /home6/kde2d/qt-copy/include/qlist.h, line 94: delete of
> > > pointer to incomplete class detected during instantiation of
> > > "void QList<type>::deleteItem(QCollection::Item) [with type=KDialogBaseButton]"
> > >     if ( del_item ) delete (type *)d;
> > > ---------------------------^

> Well, the quick (and only?) fix would be to include the kdialogbase_priv.h in
> kdiaologbase.h then, especially if this will happen for every file that includes
> kdialogbase.h. l'll guess passdlg.cpp is nothing special so the above warning
> will happen for every class that use KDialogBase
> 
> Perhaps we should rather make the KDialogBaseButton an internal class in
> KDialogBase.

Yes. Simply use the KDialogBasePrivate *d pointer to completely hide
QList<KDialogBaseBUton> list in the .cpp file.

Harri.

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

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