Developers and getting them to improve their code.

Zack Rusin kde-optimize@mail.kde.org
Wed, 8 Jan 2003 15:28:57 -0500


On Wednesday 08 January 2003 15:13, Benjamin Meyer wrote:
> > I _guess_ the dtor was added to allow future extensibility. The
> > Q_OBJECT looks necessary to me though, because without it it would
> > be impossible to use signals/slots in a class derived from the uic
> > generated one, or?
>
> Nope works fine.  For quite a bit of QTE code I manually removed the
> deconstructors and the QOBJECT lines to reduce binary size and
> increase speed.  All fo the classes were inherited and implimented in
> a child.  A class only needs QOBJECT if it has a signal or slot from
> what I understand.

I'm still not sure what optimization are you trying to achieve by 
removing the dtor. Considering you inherit from QObject (thanks, Simon, 
I don't know, my brain froze and I neglected the fact that all those 
widgets inherit from QObject) the dtor will stay virtual. So what 
advantage does removal of the empty one have?

Zack

-- 
Puritanism: The haunting fear that someone, somewhere may be happy.