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

List:       kde-core-devel
Subject:    Re: Triggering a KAction
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2000-04-30 23:29:24
[Download RAW message or body]



David Faure wrote:
> 
> 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 ?

Yeah, I was unclear. But I guess you're right, better safe than sorry.

> 
> > > 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 ;-)

:-)

Rich.

> 
> --
> 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

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard@robocast.com
http://developer.kde.org/	rich@kde.org

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

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