tst_qgraphicsproxywidget: fix memory leak
Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
4fbe3eb2a8
commit
e8bc599a74
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user