proposed KAction/KActionCollection API changes

Tobias Koenig tokoe at kde.org
Wed Jan 3 12:29:03 GMT 2007


On Wed, Jan 03, 2007 at 01:00:27PM +0100, Olivier Goffart wrote:
> Le mercredi 3 janvier 2007 12:23, Kevin Ottens a écrit :
Hi Olivier,

> > That's where I disagree, for someone knowing by heart all the methods this
> > kind of table might help. Otherwise you'll probably wonder about the role
> > of each parameter. Hence why IMO it's harder to maintain and read.
> 
> the i18n( ... ) , KIcon( ... ) , SLOT( ... ) are great hints which make the 
> role of parameters quite expressive
Right, but you have to remember the order of the arguments, so it's hard
to write a ctor without taking a look at the API docs.

With the single setter methods the order doesn't play a role and you can
easily search for all actions which have a shortcut set for example
(e.g. search: '->setShortCut').

Matthias gave a nice presentation about API design at Akademy 2004 in
Ludwigsburg where he discussed the pro and cons of ctors with many
arguments, its worth a read as well.

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070103/9665e8f1/attachment.sig>


More information about the kde-core-devel mailing list