Go to file
Olivier Goffart cdb7e81572 Fix UB in QLayout::childEvent
We can't just static_cast a child to QLayout, because the child might
not be a QLayout, and even if it was, we might be called from the
QObject destructor so we would not be a layout anymore.
Instead we can just qobject_cast the deleted object to a QLayout and
remove it from the layout with removeItem.
This would not take in account the case where we would be called because
the QLayout gets destroyed, so we handle this case from ~QLayout by
removing ourself from the parent.

Note that the comment in ~QLayout was wrong, as the layout gets destroyed
explicitly from ~QWidget, not from ~QObject.

Change-Id: I49c6f17a76f207b9d750b6e5d987469498b96b31
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-19 13:25:14 +00:00
bin
config.tests Merge remote-tracking branch 'origin/5.8' into 5.9 2017-04-06 14:16:31 +02:00
dist Add changes file for 5.8.0 2017-01-02 06:50:47 +00:00
doc Doc: Add Creating C++ Classes to externalsites/qtcreator.qdoc 2017-03-29 12:31:13 +00:00
examples Merge remote-tracking branch 'origin/5.8' into 5.9 2017-04-18 10:46:22 +02:00
lib
mkspecs Fix precompiled headers on Apple platforms, with multiple architectures 2017-04-14 00:00:56 +00:00
qmake Fix precompiled headers on Apple platforms, with multiple architectures 2017-04-14 00:00:56 +00:00
src Fix UB in QLayout::childEvent 2017-04-19 13:25:14 +00:00
tests Fix PNGs saved from QImage transform of 8-bit images 2017-04-19 10:08:41 +00:00
util Also release winmain, qopenglextensions under commercial licenses 2016-11-18 16:19:56 +00:00
.gitattributes
.gitignore Overhaul .gitignore 2017-02-16 15:11:05 +00:00
.qmake.conf Bump version 2017-01-03 13:25:46 +01:00
.tag
config_help.txt Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-24 20:01:42 +01:00
configure complain about various invalid configuration attempts 2017-01-06 20:10:10 +00:00
configure.bat reduce nesting in configure.bat 2017-01-10 12:44:21 +00:00
configure.json Merge remote-tracking branch 'origin/5.8' into 5.9 2017-04-06 14:16:31 +02:00
configure.pri Make build ABI available as qmake variable 2017-03-28 06:51:42 +00:00
header.BSD
header.BSD-OLD
header.COMM
header.FDL
header.FDL-OLD
header.GPL
header.GPL-EXCEPT
header.LGPL
header.LGPL3
header.LGPL3-COMM
header.LGPL21
header.LGPL-NOGPL2
header.LGPL-ONLY
INSTALL
LGPL_EXCEPTION.txt
LICENSE.FDL
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.GPLv3
LICENSE.LGPL3
LICENSE.LGPLv3
LICENSE.LGPLv21
LICENSE.PREVIEW.COMMERCIAL
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00