Review Request 120025: Have KStandardAction::create(...) call KActionCollection::setDefaultShortcuts()

Friedrich W. H. Kossebau kossebau at
Sun Aug 31 16:38:08 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 31, 2014, 4:38 nachm.)

Review request for KDE Frameworks.

Repository: kconfigwidgets


As e.g. reported in ("False positive critical warnings for KStandardActions") currently KXMLGUIFactoryPrivate::saveDefaultActionProperties complains about lots of actions that have been created properly via KStandardActions with a KActionCollection as parent. Just grep the log of your favourite XMLGUI-based KF5-ported program to see yourself.

I have not yet completely grasped the concept of the default shortcuts and why they are set only explicitely via KActionCollection::setDefaultShortcuts. But to me it makes some sense to have this automatically called for all standardactions which are created directly with a KActionCollection as parent.
I decided not to change KActionCollection::addAction because I had even less idea what all might be affected by that.

So this is what this patch does:
* add a call to KActionCollection::setDefaultShortcuts if there is a standard shortcut (via QMetaObject::invokeMethod, like done for KActionCollection::addAction)
* also move code which only should be done in case of a created action into one, same branch

Needs to make KActionCollection::setDefaultShortcuts() invokable.


  src/kstandardaction.cpp a18527b 




Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Kde-frameworks-devel mailing list