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)
|
if (!hasScene)
|
||||||
delete proxy;
|
delete proxy;
|
||||||
|
if (!hasWidget)
|
||||||
|
delete widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QGraphicsProxyWidget::focusOutEvent_data()
|
void tst_QGraphicsProxyWidget::focusOutEvent_data()
|
||||||
@ -1393,6 +1395,9 @@ void tst_QGraphicsProxyWidget::sizePolicy()
|
|||||||
QCOMPARE(proxy.sizePolicy(), proxyPol);
|
QCOMPARE(proxy.sizePolicy(), proxyPol);
|
||||||
else
|
else
|
||||||
QCOMPARE(proxy.sizePolicy(), widgetPol);
|
QCOMPARE(proxy.sizePolicy(), widgetPol);
|
||||||
|
|
||||||
|
if (!hasWidget)
|
||||||
|
delete widget;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user