kactioncollection and associated widget

Hamish Rodda rodda at kde.org
Sun Nov 25 00:15:09 GMT 2007


On Sat, 24 Nov 2007 10:00:15 pm Thomas Zander wrote:
> 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 :)

Ok, I'll change it.

Cheers,
Hamish.
-------------- 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/20071125/3aa9e957/attachment.sig>


More information about the kde-core-devel mailing list