From kde-devel Sun Apr 30 23:01:06 2000 From: David Faure Date: Sun, 30 Apr 2000 23:01:06 +0000 To: kde-devel Subject: Re: Triggering a KAction X-MARC-Message: https://marc.info/?l=kde-devel&m=95713595900140 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();") ? 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 adding activate() doesn't. Opinions ? -- 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