[Development] Making QScopedPointer scoped (again)

Peter Kümmel syntheticpp at gmx.net
Wed Sep 4 09:00:14 CEST 2013


On 03.09.2013 22:47, Thiago Macieira wrote:
> On terça-feira, 3 de setembro de 2013 22:12:58, Oswald Buddenhagen wrote:
>>      "A non-null QScopedPointer deletes when it leaves the scope."
>>
>> which sounds quite reasonable to me.
>
> It still does that.
>
> Moving out of a QScopedPointer simply means taking the pointer out of it
> before it goes out of scope.

But then you could use take() add wrap the pointer with something else,
only this way I would call "explicit".

Do we really wanna pollute Qt's API with QScopedPointer-s?

Peter




More information about the Development mailing list