KAction/KActionCollection proposed changes

Kevin Ottens ervin at kde.org
Sun Oct 28 10:01:31 GMT 2007


Le dimanche 28 octobre 2007, Andreas Hartmetz a écrit :
> > 3) Change KActionCollection to return a KAction* rather than a QAction*
> > for newly created actions.
> >
> > This is important because calling QAction::setShortcut(s) does not set
> > the default shortcut in KAction, as the methods are non-virtual.  So,
> > most apps will have misbehaving shortcut config dialogs otherwise.  In
> > the porting required for this I have caught many, many bugs.
>
> Interesting.

I know we discussed this on IRC, I'm just posting this here for reference.

I'm fine with such a reintroduction of KAction* in KActionCollection API if it 
is only for *factory methods*. Otherwise we'd have troubles to plug QActions 
provided by Qt into KActionCollection, that's why we did this huge porting 
away from KAction* in KActionCollection API in the first place.

> > 4) Override setShortcuts() in KAction as well (same reason as above)
> >
> >
> > If there is consensus I'd like to commit on Monday.
>
> As the other developer that I know of who made significant changes to
> KActionCollection between 3 and 4, I agree on all points :)

Dude, you've short memory here. Simon and myself suffered enough code of line 
porting around KAction and KActionCollection to be counted there. :-p

Was before your work though, but definitely between 3 and 4.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071028/56fefde6/attachment.sig>


More information about the kde-core-devel mailing list