kactioncollection and associated widget

Thomas Zander zander at kde.org
Sat Nov 24 11:00:15 GMT 2007

On Wednesday 21 November 2007 22:49:32 Hamish Rodda wrote:
> > One comment on the patch; I suggest to not return a qlist reference.
> Any particular reason why? In case we want to change the underlying
> data structure - but that's unlikey, no?

Short answer; because its kde policy.

Long answer;
its very cheap to return a qlist 'copy' as qt does the right thing for 
you. But more important; returning a reference to something that may or 
may not exist in the instance in the future is not a good idea and will 
cause hard to trace crashes.

And frankly the 'thats unlikely' reason is not nearly strong enough. I've 
seen too many times that we have to really struggle when one of 
those 'unlikely' events actually does occur :)

Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071124/00e5c82c/attachment.sig>

More information about the kde-core-devel mailing list