KDE/kdelibs/kdeui/jobs

Andreas Pakulat apaku at gmx.de
Wed Apr 8 18:40:36 BST 2009


On 08.04.09 18:25:27, David Faure wrote:
> On Wednesday 08 April 2009, Andreas Pakulat wrote:
> > On 08.04.09 14:08:26, Lubos Lunak wrote:
> > > On Wednesday 08 of April 2009, Andreas Pakulat wrote:
> > > > On 07.04.09 21:21:47, Raphael Kubo da Costa wrote:
> > > > > 2009/4/7 Andreas Pakulat <apaku at gmx.de>:
> > > > > > On 07.04.09 21:12:30, Raphael Kubo da Costa wrote:
> > > > > >> SVN commit 950837 by rkcosta:
> > > > > >>
> > > > > >> Make killJob a private slot.
> > > > > >
> > > > > > Shouldn't it rather be Q_PRIVATE_SLOT(d,_k_killJob()) and then the
> > > > > > _k_killJob method would be a member of the Private class?
> > > > >
> > > > > I don't know. Would it make any difference?
> > > >
> > > > Yes, because that allows to rename/remove the slot without breaking binary
> > > > compatibility, while with the current private slot you can't ever change
> > > > the slot in any way.
> > > 
> > >  How does changing a private: slot affect binary compatibility in any way?
> > 
> > Hmm, guess I need to be more explicit, of course I only meant the
> > signature, not the actual implementation.
> 
> That's what Lubos meant too ;)
> And he's right in theory, changing the signature of any private method is fine.
> The only thing is, that a slot can be called anyway, by name, so we better
> make it as hidden and "marked as internal" as possible (which is done by the _k_ prefix),
> otherwise people might be tempted to do an invokeMethod on it by name.
> 
> I admit that I don't see the difference between Q_PRIVATE_SLOT and
> "private slots:" for this; the only difference is whether you want the implementation
> to be in d or q.

Hmm, can't test right now, but I was under the impression that any private
methods of exported classes show up in the symbol list of the library -
maybe not on all platforms. I mean else there wouldn't be any reason (aside
from design decisions, like locality) to put methods into the d-pointer and
it could be purely a data container for private members.

Andreas
 
-- 
Your temporary financial embarrassment will be relieved in a surprising manner.




More information about the kde-core-devel mailing list