[Development] Making QScopedPointer scoped (again)

André Somers andre at familiesomers.nl
Thu Sep 5 11:02:37 CEST 2013


Op 5-9-2013 7:55, Olivier Goffart schreef:
> On Wednesday 04 September 2013 18:45:45 Alexandr Akulich wrote:
>> Hi all.
>>
>> Im totally agree with Stephen, because such change definitely complicate
>> source reading.
>> When one read "ScopedPointer", then one naturally expect that stored object
>> will be deleted.
> Except it is not.
> If someone does
>   scopedPoiner.take();
> the "expectation" is already broken.
>
> The can of worm was already open.  And adding the move operator do not change
> the readability of the code in any way.
>
The .take() is very explicit. A move, IMHO, isn't.

André




More information about the Development mailing list