qt6-bb10/tests/auto/widgets/kernel
Marc Mutz 080daae7cd Plug new leaks in tst_QFormLayout
The new takeRow() functions return a pair of pointers to
QLayoutItems and, as the name particle 'take' suggests,
releases ownership of these layout items. Which in turn
means that the caller of the function is supposed to deal
with them.

This was not done here.

To fix, write a RAII class that takes ownership of the
returned layout items, deleting them when it goes out of
scope or gets a new value assigned (only move special
member functions are implemented, making the class move
-only).

Deleting the QLayoutItems is not so easy, though:
QFormLayout has a special function for clearing the
QLayoutItems out, so it appears that just calling their
destructors is not going to fly (though I don't know off
the top of the head why that should be a problem).

Solve this, for now, by adding the layout items back into
a temporary QFormLayout for destruction.

Change-Id: If862989207b20f1e3f757c19ec9d498c4491184f
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-21 21:49:21 +00:00
..
qaction tst_qaction: Fix top level widget leaks. 2016-05-17 09:39:12 +00:00
qactiongroup Updated license headers 2016-01-21 18:55:18 +00:00
qapplication Merge remote-tracking branch 'origin/5.7' into 5.8 2016-09-29 00:38:01 +02:00
qboxlayout Merge remote-tracking branch 'origin/5.6' into 5.7 2016-09-28 11:51:35 +02:00
qdesktopwidget Updated license headers 2016-01-21 18:55:18 +00:00
qformlayout Plug new leaks in tst_QFormLayout 2016-10-21 21:49:21 +00:00
qgridlayout Merge remote-tracking branch 'origin/5.7' into 5.8 2016-09-29 00:38:01 +02:00
qlayout QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
qshortcut Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-08 17:15:55 +02:00
qsizepolicy Updated license headers 2016-01-21 18:55:18 +00:00
qstackedlayout Updated license headers 2016-01-21 18:55:18 +00:00
qtooltip Updated license headers 2016-01-21 18:55:18 +00:00
qwidget Merge remote-tracking branch 'origin/5.7' into 5.8 2016-09-29 00:38:01 +02:00
qwidget_window Add support for Apple watchOS 2016-08-19 21:05:55 +00:00
qwidgetaction Updated license headers 2016-01-21 18:55:18 +00:00
qwidgetmetatype Updated license headers 2016-01-21 18:55:18 +00:00
qwidgetsvariant Updated license headers 2016-01-21 18:55:18 +00:00
qwindowcontainer Merge remote-tracking branch 'origin/5.6' into dev 2016-02-02 15:57:44 +01:00
kernel.pro Introducing QWidget::createWindowContainer() 2013-01-25 14:11:07 +01:00