[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: uic
From: Benjamin Meyer <ben () meyerhome ! net>
Date: 2002-11-09 1:44:06
[Download RAW message or body]
No, if you don't do anything in a deconstructor you don't need one especially
if you are inheariting another class that already has a deconstructor. When
compiled with an empty deconstructor it adds a pointless function to the exe.
When might you need the className() function? Only if you used signals and
slots which in classes that have nothing but a constructor (and a
deconstructor as it currenttly is) you wouldn't need it. The sub object (if
it is wanted) that is inhearited said class and impliments it would need
Q_OBJECT, but it wouldn't. Heck maybe it would be nice to modify uic to just
output it as 1 function that you can then include in your class removing even
the overhead of inhearitance.
-Benjamin Meyer
On Friday 08 November 2002 05:36 pm, Nicolas Goutte wrote:
> But deleting means that you need a destructor. Even QT is only C++. That
> has nothing to do how/where the delete is done.
>
> As for Q_OBJECT, it is not only there only for slots and signals. In QT, it
> is also for returning the class name, for translation (not used by KDE),
> for QT's casting. (You can look in a .moc file.) So how UIC could decide
> that Q_OBJECT is not needed?
>
> Have a nice day/evening/night!
>
> On Friday 08 November 2002 18:32, ben@meyerhome.net wrote:
> > Yes, the class is automagicly deleted and so it isn't needed, so
> > shouldn't uic not ouput an empty deconstructor? Also if there are not
> > signal's or Slots should it also not add a Q_OBJECT to the header which
> > causes more bloat?
> >
> > -Benjamin Meyer
> >
> > Original Message:
> > -----------------
> > From: Nicolas Goutte nicog@snafu.de
> > Date: Fri, 8 Nov 2002 17:34:46 +0100
> > To: kde-devel@kde.org
> > Subject: Re: uic
> >
> >
> > As far as I know, QDialog and friends do delete the classes. It is only
> > the
> >
> > developer who has not to think about it.
> >
> > Have a nice day/evening/night!
> >
> > On Friday 08 November 2002 16:21, ben@meyerhome.net wrote:
> > > I noticed that when uic outputs a class it will always have a
> >
> > deconstructor
> >
> > > even though I havn't seen it ever being used other then to have the fun
> > > comment about how cool qt is sense it doesn't have to delete anything.
> > >
> > > If the deconstructor isn't going to be used should it not include in
> > > the outputeded class sense it contributes (abit a very very small
> > > amount) to the speed and size of the application.
> > >
> > > -Benjamin Meyer
> > >
> > > --------------------------------------------------------------------
> > > mail2web - Check your email from the web at
> > > http://mail2web.com/ .
> > >
> > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > > >> unsubscribe <<
> > >>
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >
> > unsubscribe <<
> >
> > --------------------------------------------------------------------
> > mail2web - Check your email from the web at
> > http://mail2web.com/ .
> >
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > >> unsubscribe <<
> >>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic