summaryrefslogtreecommitdiffstats
path: root/src/tools/bootstrap
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-05-02 14:45:35 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-06-07 10:43:16 +0200
commitd73497cf770c92e38903850267fd8737df3578ca (patch)
treebd8523d20d750bd3461e959df0e4865137ac914a /src/tools/bootstrap
parent9dec965248503836ad478b1c1ffdd7f34aed048b (diff)
QObject/QWidget::setParent: add assertions to prevent loops
It is perfectly possible to accidentally create a parent/child loop. This can happens by direct means (a->setParent(b); b->setParent(a);), or some more subtle means, e.g. class MyClass : public QObject { MyClass() : QObject(this) {} }; Since this is UB, add a few robustness checks to make sure the code above crashes right away (at least in debug builds). Change-Id: I6583c8514b4c1f8a90677b04c77b8e8f0c15dba3 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/tools/bootstrap')
0 files changed, 0 insertions, 0 deletions