[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: private slots
From: Simon Hausmann <hausmann () kde ! org>
Date: 2007-01-04 16:45:13
Message-ID: 200701041800.17468.hausmann () kde ! org
[Download RAW message or body]
On Thursday 04 January 2007 17:24, André Wöbbeking wrote:
> On Wednesday 03 January 2007 16:39, Simon Hausmann wrote:
> > On Wednesday 03 January 2007 16:23, Thomas Zander wrote:
> > > How is this better than the following?
> > >
> > > private slots:
> > > void slotDateChanged();
> >
> > Because slotDateChanged() is a publically exported symbol. On
> > non-Msvc compilers you can still call it with #define private/public
> > hacks. On Windows you can't remove it at all without breaking binary
> > compatibility (even if no application calls it).
>
> Can you still connect to private slots from "outside"? If so you can
> call every private slot.
Yes, that is correct. That is why (I forgot to mention that) we should use a
cryptic prefix for our private slots, to stress the fact to anybody trying to
connect/call them from the outside that they shouldn't do it and that private
slots may change/disappear any time.
In Qt we use the ugly _q_ prefix. I suggest to use _k_ in KDE ;-) (I've seen
some people already doing that). So slotDateChanged() becomes
_k_slotDateChanged().
Simon
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic