[Development] Opinions on QTBUG-71545

Elvis Stansvik elvstone at gmail.com
Mon Nov 5 20:56:36 CET 2018


Den mån 5 nov. 2018 kl 20:32 skrev Konstantin Shegunov <kshegunov at gmail.com>:
>
> Hello,
> Since we couldn't agree, I'd love to see some more opinions about this one.[1]

I may be missing some detail, but I think what Thiago says makes
sense. When children are destroyed, you know you're in the QObject
destructor (from QObject::~QObject docs: "Destroys the object,
deleting all its child objects."), so you know the object is now a
QObject, no longer a QCoreApplication. If you require your
QCoreApplication to be alive by the time your child object is
destroyed, I think you have to ensure this on your own.

Like I said, I may be missing something, but that's what it looks like
to me. I can't see why there would be an exception to the object model
here.

Elvis

>
> Specifically:
> 1) Is parenting to the application object a thing?
> 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.
>
> [1] https://bugreports.qt.io/browse/QTBUG-71545
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list