30.12.2016, 22:31, "Alexander Dyagilev" <alervd...@gmail.com>:
> Another,  i think a better idea:
>
> Just rename QScopedPointer to QUniquePointer.

Just use std::unique_ptr<>

>
> THEN:
>
> 1. class QScopedPointer : public QUniquePointer {}
>
> 2. in this new QScopedPointer class forbid all the move semantics.
>
> Isn't it a brilliant idea? :)
>
> On 12/30/2016 10:27 PM, Alexander Dyagilev wrote:
>> Hmmm.... So there is not std::unique_ptr analogue in Qt?
>>
>> And we have to use std::unique_ptr with a special deleter...
>>
>> (I would like to use &QObjet::deleteLater one).
>>
>> Sadly...
>>
>> Why don't you just introduce another class with another name that do support?
>>
>> E.g. QUniquePointer : public QScopedPointer {...}. Or write a completely new 
>> one if you don't like this style...
>>
>> On 12/30/2016 10:18 PM, Giuseppe D'Angelo wrote:
>>> Il 30/12/2016 19:47, Alexander Dyagilev ha scritto:
>>>> Hello, https://bugreports.qt.io/browse/QTBUG-29754 states that the problem 
>>>> was fixed and QScopedPointer supports it now.
>>>
>>> I implemented it in 5b9006bbdba7dcab01b8e640554a7d7a4b64f76b, but then a 
>>> discussion on the mailing list caused the change to be reverted in 
>>> 3f6ed5566fcfbbba4cadfade460460f8ebf06ad3. The rationale was that the name 
>>> "QScopedPointer" implies that the pointer cannot escape the scope, and move 
>>> operations whould allow that. HTH,
>>>
>>> _______________________________________________ Interest mailing list 
>>> Interest@qt-project.org 
>>> http://lists.qt-project.org/mailman/listinfo/interest
> ,
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


-- 
Regards,
Konstantin
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to