[Development] unique_ptr and Qt, Take 2
Иван Комиссаров
abbapoh at gmail.com
Mon May 6 09:37:17 CEST 2019
True, but it’s ownership is never transferred, so it’s out of the scope of discussion - user is free to use any c++ idiom he likes.
I would like to discuss how to transfer ownership in modern Qt.
> 6 мая 2019 г., в 9:30, Christian Kandeler <christian.kandeler at qt.io> написал(а):
>
> On Sat, 04 May 2019 09:06:39 +0200
> Allan Sandfeld Jensen <kde at carewolf.com> wrote:
>
>> On Samstag, 4. Mai 2019 00:43:10 CEST Thiago Macieira wrote:
>>> On Friday, 3 May 2019 13:00:52 PDT Иван Комиссаров wrote:
>>>> Which should be considered bad practice and banned on an API level
>>>
>>> No way.
>>>
>>> Are you going to forbid creation of QFile on the stack?
>>
>> Perhaps QFile shouldn't be the same kind of base object type as QWidgets? Or
>> not use the same smart pointer.
>>
>> Though even making QWidgets not allowed on the stack, while sensible, would
>> break a many of our tests, where we "abuse" that it is technically possible in
>> simple cases.
>
> Doesn't almost every project create its main widget on the stack?
>
>
> Christian
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190506/88171129/attachment.html>
More information about the Development
mailing list