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

Friedrich W. H. Kossebau kossebau at kde.org
Sun Aug 31 16:35:59 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120025/
-----------------------------------------------------------

Review request for KDE Frameworks.


Repository: kconfigwidgets


Description
-------

As e.g. reported in https://bugs.kde.org/show_bug.cgi?id=338222 ("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 https://git.reviewboard.kde.org/r/120024/ to make KActionCollection::setDefaultShortcuts() invokable.


Diffs
-----

  src/kstandardaction.cpp a18527b 

Diff: https://git.reviewboard.kde.org/r/120025/diff/


Testing
-------


Thanks,

Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140831/904cdce9/attachment.html>


More information about the Kde-frameworks-devel mailing list