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

List:       kde-core-devel
Subject:    Re: Triggering a KAction
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-04-30 23:11:30
[Download RAW message or body]

On Mon, May 01, 2000 at 12:10:59AM +0100, Richard Moore wrote:
> 
> 
> David Faure wrote:
> > 
> > On Thu, Apr 27, 2000 at 08:25:47PM +0100, David Faure wrote:
> > > On Thu, Apr 27, 2000 at 12:03:58PM -0700, Charles wrote:
> > > >
> > > > I'm trying to find a way to trigger a KAction.
> > > >
> > > > I havn't seen a function for it anywhere, and I think it's really important
> > > > that it is added.
> > >
> > > setChecked used to do that and it was a pain - why not simply call the action's slot ?
> > >
> > > There is perhaps a way to activate them though, not sure.
> > 
> > Actually there doesn't seem to be, and indeed I find it missing too
> > (just found a case where I need it). Since Simon used sender(),
> > I can't call the slot directly ;-). Not that I see a way without sender(),
> > though (since it's a dynamically-created list of toggable actions, we
> > can't have one slot per action). So...
> > is there any objection against me adding to KAction:
> > 
> > void activate();
> > 
> > (which would simply "emit activated();") ?
> > 
> 
> Why bother emitting the signal? It could just call activated() directly.

slotActivated(), you mean ? Well, to be on the safe side, in case anyone
else connected to the signal... no ?

> > Alternatively, we could make KAction::slotActivated public, since
> > it does exactly that. Can't rename it though (it would mean changing
> > all the overriding methods). And making it public breaks BC, whereas
> 
> Changing the access protection of protection of a method does not
> affect binary compatability (as I remember Kalle explaining to me
> a couple of years ago). IMHO it should, but that's a different
> matter.

Ah ;-)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

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

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