The future of KAction

Kevin Krammer kevin.krammer at
Sat Nov 12 11:55:11 GMT 2005

On Saturday 12 November 2005 08:04, Hamish Rodda wrote:

> > > * the activated() signal with the activation reason.  I can't see the
> > > required hooks anywhere.
> >
> > Please look in kbookmarkbar and kbookmarkmenu, as well as konq.
> > This allows to detect RMB, Shift+LMB, Ctrl+LMB, Shift+LMB on MenuItem
> > (for trash) etc. I would very much hate to lose those features after
> > having worked on adding them to 3.4 ... (you saw the @since, right? :)
> Yes, I am aware of the @since.
> I have considered this further: as long as the receiver is in the same
> thread, QApplication::keyboardModifiers() and QApplication::mouseButtons()
> should return the same values as when the action is activated, since no
> further event processing will have been done (correct me if I'm wrong).  I
> would consider it highly unlikely that this feature would need to be used
> across threads, and if so, surely the programmer can do a little more work
> to save the modifiers and buttons flags themselves before transporting the
> signal across threads.

That means the receiver class gets an artifical dependency on QApplication.
By the same reasoning there would be no need for QMouseEvent to transport any 
data other than the activating button, position can be retrieved from QCursor 
and buttons state from QApplication.

> As for the activation reason, the only place I can find that it is actually
> used is:
> * KDirOperator, Konqueror and KDesktop.  Here, files are deleted rather
> than being trashed when shift is held and the action is activated via popup
> menu.
> * Quanta (TagAction) uses it to detect emulated actions only.  The reason
> isn't too clear (perhaps the Andras et. al. could fill us in)
> * komacro in playground/office connects to the signal but doesn't use the
> information.
> * ksystemlog in playground/sysadmin connects to the signal but only uses
> the modifier state, which can be gained as above.

Not sure how MMB clicking on toolbar buttons and menus are currently handled, 
but it would be nice if it would still be possible to open bookmarks or Home 
or Back in a new tab when using actions everywhere.


Kevin Krammer <kevin.krammer at>
Qt/KDE Developer, Debian User
Moderator: (German),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list