summaryrefslogtreecommitdiffstats
path: root/tests/auto/cpptest/q3dsurface
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-11-06 11:36:23 +0200
committerMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-11-06 11:46:26 +0200
commitb6bf8a4b70091f836a20f4848d3dc00e82bafe3c (patch)
tree7f40572605816fb28bea19009a264ce0f1d58faa /tests/auto/cpptest/q3dsurface
parent46ef32d424d7e0209e52528286e31f656c654289 (diff)
Fixed Valgrind reported issues in cpp tests
Change-Id: I284832fc697e0ac6ef1ba1bb857892a10cbcd8fd Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'tests/auto/cpptest/q3dsurface')
-rw-r--r--tests/auto/cpptest/q3dsurface/tst_surface.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/cpptest/q3dsurface/tst_surface.cpp b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
index 0ae0a326..a71af1ee 100644
--- a/tests/auto/cpptest/q3dsurface/tst_surface.cpp
+++ b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
@@ -86,7 +86,8 @@ void tst_surface::construct()
QVERIFY(graph);
delete graph;
- graph = new Q3DSurface(new QSurfaceFormat());
+ QSurfaceFormat format;
+ graph = new Q3DSurface(&format);
QVERIFY(graph);
delete graph;
}
@@ -217,6 +218,8 @@ void tst_surface::removeSeries()
m_graph->addSeries(series);
m_graph->removeSeries(series);
QCOMPARE(m_graph->seriesList().length(), 0);
+
+ delete series;
}
void tst_surface::removeMultipleSeries()
@@ -241,6 +244,10 @@ void tst_surface::removeMultipleSeries()
m_graph->removeSeries(series3);
QCOMPARE(m_graph->seriesList().length(), 0);
+
+ delete series;
+ delete series2;
+ delete series3;
}
QTEST_MAIN(tst_surface)