summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp')
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index 3c4c1a1d41..c1ab5f51be 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -341,6 +341,8 @@ void tst_QGridLayout::setMinAndMaxSize()
layout.removeItem(spacer);
+ delete spacer;
+ spacer = Q_NULLPTR;
rightChild.hide();
QApplication::sendPostedEvents(0, 0);
@@ -1577,10 +1579,10 @@ void tst_QGridLayout::contentsRect()
void tst_QGridLayout::distributeMultiCell()
{
QWidget w;
- Qt42Style *style = new Qt42Style();
- style->spacing = 9;
+ Qt42Style style;
+ style.spacing = 9;
- w.setStyle(style);
+ w.setStyle(&style);
QGridLayout grid;
w.setLayout(&grid);