[Development] Opinions on QTBUG-71545
elvstone at gmail.com
Mon Nov 5 21:07:15 CET 2018
Den mån 5 nov. 2018 kl 20:58 skrev Tomasz Siekierda <sierdzio at gmail.com>:
> On Mon, 5 Nov 2018 at 20:32, Konstantin Shegunov <kshegunov at gmail.com> wrote:
> > Hello,
> > Since we couldn't agree, I'd love to see some more opinions about this one.
> > Specifically:
> > 1) Is parenting to the application object a thing?
> Never done it myself. But Q*Application is clearly marked as derived
> from QObject in the docs, so users can definitely expect it to behave
> the same as all other QObjects and clean up it's children properly.
If it is to be the same as all other QObjects, then it should maintain
its current behavior I think. The destruction of children happens in
the QObject destructor. I don't even think one have to look at the
QObject destructor docs to understand that - where else would it be
done, considering the parent/child mechanism is a mechanism common to
all QObject-derived classes
> > 1.a) ... and should it be allowed (i.e. accepting the proposed change)?
> > 1.b) .. if not allowed, should we put a warning in the documentation that it is wrong and shouldn't be done at all, or at least that it's discouraged.
> Either is OK I think, with preference for 1.a). Note: these are not
> mutually exclusive - we could have the patch integrated & a warning in
> the docs that this is not encouraged.
> Disclaimer: I'm not a reviewer, nor approver, barely a contributor
> even, so feel free to ignore my opinion.
> Development mailing list
> Development at qt-project.org
More information about the Development