Re: [Development] Setters: Clarifying the ownership

2018-01-22 Thread Marco Bubke
urday, January 20, 2018 9:17:43 AM To: Thiago Macieira Cc: development@qt-project.org Subject: Re: [Development] Setters: Clarifying the ownership Please use an already existing solution to this problem : https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ri-raw Errors wi

Re: [Development] Setters: Clarifying the ownership

2018-01-20 Thread Eric Lemanisser
Please use an already existing solution to this problem : https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ri-raw Errors will be caught by the compiler in case of std::unique_ptr, and by static analysers (like clang-tidy) for gsl::owner, without run-time cost. There was

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Thiago Macieira
On Friday, 19 January 2018 09:26:10 PST Edward Welbourne wrote: > Jaroslaw Kobus (19 January 2018 17:09) > > > "give" may be confused with "get", which is usually an accessor. I may > > also think "Am I giving (to QCoreApplication)" or "The > > QCoreApplication is giving (me)". Maybe it is just a

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Edward Welbourne
Jaroslaw Kobus (19 January 2018 17:09) > "give" may be confused with "get", which is usually an accessor. I may > also think "Am I giving (to QCoreApplication)" or "The > QCoreApplication is giving (me)". Maybe it is just a matter of the > other verb? Absorb, hand over, hand on, suck in, swallow...

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Konstantin Tokarev
19.01.2018, 20:07, "Adam Treat" : > How about "transfer" Why not just use move semantics of language instead of inventing new terms? > > On 01/19/2018 11:57 AM, Thiago Macieira wrote: >>  On sexta-feira, 19 de janeiro de 2018 08:26:21 PST Philippe wrote: >>>  +20 years ago, the (good) Taligent

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Adam Treat
How about "transfer" On 01/19/2018 11:57 AM, Thiago Macieira wrote: On sexta-feira, 19 de janeiro de 2018 08:26:21 PST Philippe wrote: +20 years ago, the (good) Taligent crossplatform project, in its guideline, proposed: adopt() aka "take ownership" orphan() aka "release ownership" Given tha

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Thiago Macieira
On sexta-feira, 19 de janeiro de 2018 08:26:21 PST Philippe wrote: > +20 years ago, the (good) Taligent crossplatform project, in its guideline, > proposed: > > adopt() aka "take ownership" > > orphan() aka "release ownership" Given that we already have "take" methods that release ownership in

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Philippe
> > > From: Development > on behalf of Jesus Fernandez > Sent: Friday, January 19, 2018 4:15:52 PM > To: development@qt-project.org > Subject: [Development] Setters: Clarifying the ownership > >

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Jaroslaw Kobus
r, hand on, suck in, swallow... Jarek From: Development on behalf of Jesus Fernandez Sent: Friday, January 19, 2018 4:15:52 PM To: development@qt-project.org Subject: [Development] Setters: Clarifying the ownership Hi all! I always found something annoying in the Qt API. The problem comes wit

Re: [Development] Setters: Clarifying the ownership

2018-01-19 Thread Konstantin Tokarev
19.01.2018, 18:16, "Jesus Fernandez" : > Hi all! > > I always found something annoying in the Qt API. The problem comes with the > setters of our properties. When I want to pass an object to a property I > never know if I need to take care of the object or relay on parenting system > to avoid

[Development] Setters: Clarifying the ownership

2018-01-19 Thread Jesus Fernandez
Hi all! I always found something annoying in the Qt API. The problem comes with the setters of our properties. When I want to pass an object to a property I never know if I need to take care of the object or relay on parenting system to avoid memory leaks. To know if the object is going to be r