From e8bc599a7448f20cec4e4afad5b7963dca930fd9 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 20 Aug 2013 15:50:18 +0200 Subject: tst_qgraphicsproxywidget: fix memory leak Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9 Reviewed-by: Friedemann Kleint --- .../graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 494d4584b5..bf6d9abb18 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -808,6 +808,8 @@ void tst_QGraphicsProxyWidget::focusNextPrevChild() if (!hasScene) delete proxy; + if (!hasWidget) + delete widget; } void tst_QGraphicsProxyWidget::focusOutEvent_data() @@ -1393,6 +1395,9 @@ void tst_QGraphicsProxyWidget::sizePolicy() QCOMPARE(proxy.sizePolicy(), proxyPol); else QCOMPARE(proxy.sizePolicy(), widgetPol); + + if (!hasWidget) + delete widget; } } -- cgit v1.2.3