diff options
author | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2014-11-06 11:36:23 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2014-11-06 11:46:26 +0200 |
commit | b6bf8a4b70091f836a20f4848d3dc00e82bafe3c (patch) | |
tree | 7f40572605816fb28bea19009a264ce0f1d58faa /tests/auto/cpptest/q3dbars/tst_bars.cpp | |
parent | 46ef32d424d7e0209e52528286e31f656c654289 (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/q3dbars/tst_bars.cpp')
-rw-r--r-- | tests/auto/cpptest/q3dbars/tst_bars.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/cpptest/q3dbars/tst_bars.cpp b/tests/auto/cpptest/q3dbars/tst_bars.cpp index 6910e4fa..3d4daaef 100644 --- a/tests/auto/cpptest/q3dbars/tst_bars.cpp +++ b/tests/auto/cpptest/q3dbars/tst_bars.cpp @@ -96,7 +96,8 @@ void tst_bars::construct() QVERIFY(graph); delete graph; - graph = new Q3DBars(new QSurfaceFormat()); + QSurfaceFormat format; + graph = new Q3DBars(&format); QVERIFY(graph); delete graph; } @@ -250,6 +251,7 @@ void tst_bars::removeSeries() m_graph->addSeries(series); m_graph->removeSeries(series); QCOMPARE(m_graph->seriesList().length(), 0); + delete series; } void tst_bars::removeMultipleSeries() @@ -276,6 +278,10 @@ void tst_bars::removeMultipleSeries() m_graph->removeSeries(series3); QCOMPARE(m_graph->seriesList().length(), 0); + + delete series; + delete series2; + delete series3; } // The following tests are not required for scatter or surface, as they are handled identically |