Like in other test functions in this class, the QGraphicsWidgets were leaked. So the solution is the same: hold them in a QVLA. Also like in other test functions, the child layouts _are_ owned by the parent layout, so were not leaked. There's a twist here, though: we're removing layout items, which may be widgets _or_ layouts. The old code deleted the removed layout item, but we can't do that anymore, since it may be one of the widgets that are owned by the QVLA, and that would cause a double-delete. If we don't delete the removed item at all anymore, though, we'd leak it when it was a layout. So hold the layouts in QVLA, too. _Then_ we don't need to delete the removed item anymore. Amends the start of the public history. Pick-to: 6.8 6.5 5.15 Change-Id: I16c61eb18f2843ceb72a432db1bd9be29e258bfd Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 0665ae81fb33dc6f71f494ad6df92f85aad70ca4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.