[Patch] Add all xmlgui actions to the XmlGui mainwindow, reinstate KActionCollection::*AssociatedWidget()

Hamish Rodda rodda at kde.org
Wed Nov 28 04:42:15 GMT 2007


Hi,

There are a series of bugreports (151421 and duplicates) in which actions' 
shortcuts stop working when the menu bar is hidden.  It has come to my 
attention that kde3 used to plug all of the xmlgui actioncollection's actions 
into the top level main window using KAccel.  In addition to menu bar hiding, 
this should make any actions which are not plugged into a specific widget 
(eg. in ports from kde3 apps) work again.

This patch does just this, and in doing so changes the semantics of the 
KActionCollection::*AssociatedWidget functions.  They were recently removed 
because the shortcut context of actions would change when added to an action 
collection using this feature.  Now, *AssociatedWidget does not touch the 
shortcut context (that's the app developers' responsibility), thus 
maintaining the integrity of the container in not modifying the actions 
themselves.

I have run this patch for about week and not noticed any side effects as a 
result.

I have kept and marked as deprecated the ::associateWidget() function, but I 
would be happy to remove this should it be allowed.  I did make it non-const, 
so it's SC but not BC as it stands at the moment.  (I could just use a 
const_cast if needed)

I have also ported all of kde that I have checked out locally, and I would 
commit that at the same time.

Ok to commit?

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-associatedWidget2.patch
Type: text/x-diff
Size: 12244 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071128/8aab0039/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase-associatedWidget.patch
Type: text/x-diff
Size: 1940 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071128/8aab0039/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071128/8aab0039/attachment.sig>


More information about the kde-core-devel mailing list