KShortcut and properties

Jakub Stachowski qbast at go2.pl
Sat Apr 14 18:27:38 BST 2007


Hello,

KAction has two properties of type KShortcut: shortcut and globalShortcut. The 
problem is that KShortcut is not registered with Qt metatype system so it 
cannot really be used as type of property. This causes bug in 
KXMLGUIFactory::configureAction - it reads shortcuts from .ui file ( 
ActionProperties node) and tries to set them using setProperty("shortcut",
[QString with shortcut definition]. This will fail because bug mentioned 
above and because QString won't be casted to KShortcut automatically.
Attached is patch that fixes both KShortcut-as-property problem (did i put 
qRegisterMetaType calls in proper places?) and casting in KXMLGUIFactory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kshortcut-qmeta.diff
Type: text/x-diff
Size: 2411 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070414/59957610/attachment.diff>


More information about the kde-core-devel mailing list