summaryrefslogtreecommitdiffstats
path: root/tests/auto/cpptest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cpptest')
-rw-r--r--tests/auto/cpptest/q3daxis-category/tst_axis.cpp14
-rw-r--r--tests/auto/cpptest/q3daxis-logvalue/tst_axis.cpp14
-rw-r--r--tests/auto/cpptest/q3daxis-value/tst_axis.cpp14
-rw-r--r--tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp50
-rw-r--r--tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp14
-rw-r--r--tests/auto/cpptest/q3dbars-series/tst_series.cpp14
-rw-r--r--tests/auto/cpptest/q3dbars/tst_bars.cpp22
-rw-r--r--tests/auto/cpptest/q3dcustom-label/tst_custom.cpp14
-rw-r--r--tests/auto/cpptest/q3dcustom-volume/tst_custom.cpp14
-rw-r--r--tests/auto/cpptest/q3dcustom/tst_custom.cpp14
-rw-r--r--tests/auto/cpptest/q3dinput-touch/tst_input.cpp14
-rw-r--r--tests/auto/cpptest/q3dinput/tst_input.cpp14
-rw-r--r--tests/auto/cpptest/q3dscatter-modelproxy/tst_proxy.cpp37
-rw-r--r--tests/auto/cpptest/q3dscatter-proxy/tst_proxy.cpp14
-rw-r--r--tests/auto/cpptest/q3dscatter-series/tst_series.cpp14
-rw-r--r--tests/auto/cpptest/q3dscatter/tst_scatter.cpp23
-rw-r--r--tests/auto/cpptest/q3dscene-camera/tst_camera.cpp14
-rw-r--r--tests/auto/cpptest/q3dscene-light/tst_light.cpp14
-rw-r--r--tests/auto/cpptest/q3dscene/tst_scene.cpp24
-rw-r--r--tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp18
-rw-r--r--tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp64
-rw-r--r--tests/auto/cpptest/q3dsurface-proxy/tst_proxy.cpp14
-rw-r--r--tests/auto/cpptest/q3dsurface-series/tst_series.cpp14
-rw-r--r--tests/auto/cpptest/q3dsurface/tst_surface.cpp23
-rw-r--r--tests/auto/cpptest/q3dtheme/tst_theme.cpp14
25 files changed, 264 insertions, 235 deletions
diff --git a/tests/auto/cpptest/q3daxis-category/tst_axis.cpp b/tests/auto/cpptest/q3daxis-category/tst_axis.cpp
index 800a0953..158fc3a2 100644
--- a/tests/auto/cpptest/q3daxis-category/tst_axis.cpp
+++ b/tests/auto/cpptest/q3daxis-category/tst_axis.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3daxis-logvalue/tst_axis.cpp b/tests/auto/cpptest/q3daxis-logvalue/tst_axis.cpp
index adbedb24..d199187d 100644
--- a/tests/auto/cpptest/q3daxis-logvalue/tst_axis.cpp
+++ b/tests/auto/cpptest/q3daxis-logvalue/tst_axis.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3daxis-value/tst_axis.cpp b/tests/auto/cpptest/q3daxis-value/tst_axis.cpp
index 92029f13..fe244936 100644
--- a/tests/auto/cpptest/q3daxis-value/tst_axis.cpp
+++ b/tests/auto/cpptest/q3daxis-value/tst_axis.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp b/tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp
index c65e151b..22a236bc 100644
--- a/tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -164,7 +164,7 @@ void tst_proxy::initializeProperties()
{
QVERIFY(m_proxy);
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
m_proxy->setAutoColumnCategories(false);
m_proxy->setAutoRowCategories(false);
@@ -172,7 +172,7 @@ void tst_proxy::initializeProperties()
m_proxy->setColumnRole("column");
m_proxy->setColumnRolePattern(QRegExp("/^.*-(\\d\\d)$/"));
m_proxy->setColumnRoleReplace("\\\\1");
- m_proxy->setItemModel(table->model());
+ m_proxy->setItemModel(table.model());
m_proxy->setMultiMatchBehavior(QItemModelBarDataProxy::MMBAverage);
m_proxy->setRotationRole("rotation");
m_proxy->setRotationRolePattern(QRegExp("/-/"));
@@ -209,28 +209,28 @@ void tst_proxy::initializeProperties()
void tst_proxy::multiMatch()
{
- Q3DBars *graph = new Q3DBars();
+ Q3DBars graph;
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
QStringList rows;
rows << "row 1" << "row 2" << "row 3";
QStringList columns;
columns << "col 1";
const char *values[1][3] = {{"0/0/3.5/30", "0/0/5.0/30", "0/0/6.5/30"}};
- table->setRowCount(1);
- table->setColumnCount(3);
+ table.setRowCount(1);
+ table.setColumnCount(3);
for (int col = 0; col < columns.size(); col++) {
for (int row = 0; row < rows.size(); row++) {
- QModelIndex index = table->model()->index(col, row);
- table->model()->setData(index, values[col][row]);
+ QModelIndex index = table.model()->index(col, row);
+ table.model()->setData(index, values[col][row]);
}
}
- m_proxy->setItemModel(table->model());
- m_proxy->setRowRole(table->model()->roleNames().value(Qt::DisplayRole));
- m_proxy->setColumnRole(table->model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setItemModel(table.model());
+ m_proxy->setRowRole(table.model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setColumnRole(table.model()->roleNames().value(Qt::DisplayRole));
m_proxy->setRowRolePattern(QRegExp(QStringLiteral("^(\\d*)\\/(\\d*)\\/\\d*[\\.\\,]?\\d*\\/\\d*[\\.\\,]?\\d*$")));
m_proxy->setRowRoleReplace(QStringLiteral("\\2"));
m_proxy->setValueRolePattern(QRegExp(QStringLiteral("^\\d*(\\/)(\\d*)\\/(\\d*[\\.\\,]?\\d*)\\/\\d*[\\.\\,]?\\d*$")));
@@ -240,27 +240,29 @@ void tst_proxy::multiMatch()
QBar3DSeries *series = new QBar3DSeries(m_proxy);
- graph->addSeries(series);
+ graph.addSeries(series);
QCoreApplication::processEvents();
- QCOMPARE(graph->valueAxis()->max(), 6.5f);
+ QCOMPARE(graph.valueAxis()->max(), 6.5f);
m_proxy->setMultiMatchBehavior(QItemModelBarDataProxy::MMBFirst);
QCoreApplication::processEvents();
- QCOMPARE(graph->valueAxis()->max(), 3.5f);
+ QCOMPARE(graph.valueAxis()->max(), 3.5f);
m_proxy->setMultiMatchBehavior(QItemModelBarDataProxy::MMBLast);
QCoreApplication::processEvents();
- QCOMPARE(graph->valueAxis()->max(), 6.5f);
+ QCOMPARE(graph.valueAxis()->max(), 6.5f);
m_proxy->setMultiMatchBehavior(QItemModelBarDataProxy::MMBAverage);
QCoreApplication::processEvents();
- QCOMPARE(graph->valueAxis()->max(), 5.0f);
+ QCOMPARE(graph.valueAxis()->max(), 5.0f);
m_proxy->setMultiMatchBehavior(QItemModelBarDataProxy::MMBCumulative);
QCoreApplication::processEvents();
- QCOMPARE(graph->valueAxis()->max(), 15.0f);
+ QCOMPARE(graph.valueAxis()->max(), 15.0f);
QCOMPARE(m_proxy->columnLabels().count(), 1);
QCOMPARE(m_proxy->rowCount(), 1);
QCOMPARE(m_proxy->rowLabels().count(), 1);
QVERIFY(m_proxy->series());
+
+ m_proxy = 0; // Proxy gets deleted as graph gets deleted
}
QTEST_MAIN(tst_proxy)
diff --git a/tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp b/tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp
index 8d64ed54..68c21a8e 100644
--- a/tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dbars-series/tst_series.cpp b/tests/auto/cpptest/q3dbars-series/tst_series.cpp
index e2a40ae7..4ae1574e 100644
--- a/tests/auto/cpptest/q3dbars-series/tst_series.cpp
+++ b/tests/auto/cpptest/q3dbars-series/tst_series.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dbars/tst_bars.cpp b/tests/auto/cpptest/q3dbars/tst_bars.cpp
index 6910e4fa..22e5de44 100644
--- a/tests/auto/cpptest/q3dbars/tst_bars.cpp
+++ b/tests/auto/cpptest/q3dbars/tst_bars.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -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
diff --git a/tests/auto/cpptest/q3dcustom-label/tst_custom.cpp b/tests/auto/cpptest/q3dcustom-label/tst_custom.cpp
index 40bd5eac..01cf26a6 100644
--- a/tests/auto/cpptest/q3dcustom-label/tst_custom.cpp
+++ b/tests/auto/cpptest/q3dcustom-label/tst_custom.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dcustom-volume/tst_custom.cpp b/tests/auto/cpptest/q3dcustom-volume/tst_custom.cpp
index 372e8ecf..39453fb0 100644
--- a/tests/auto/cpptest/q3dcustom-volume/tst_custom.cpp
+++ b/tests/auto/cpptest/q3dcustom-volume/tst_custom.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dcustom/tst_custom.cpp b/tests/auto/cpptest/q3dcustom/tst_custom.cpp
index abc088f9..f79367de 100644
--- a/tests/auto/cpptest/q3dcustom/tst_custom.cpp
+++ b/tests/auto/cpptest/q3dcustom/tst_custom.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dinput-touch/tst_input.cpp b/tests/auto/cpptest/q3dinput-touch/tst_input.cpp
index 53d760ae..5541bf6d 100644
--- a/tests/auto/cpptest/q3dinput-touch/tst_input.cpp
+++ b/tests/auto/cpptest/q3dinput-touch/tst_input.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dinput/tst_input.cpp b/tests/auto/cpptest/q3dinput/tst_input.cpp
index 68b2225c..f5486d11 100644
--- a/tests/auto/cpptest/q3dinput/tst_input.cpp
+++ b/tests/auto/cpptest/q3dinput/tst_input.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dscatter-modelproxy/tst_proxy.cpp b/tests/auto/cpptest/q3dscatter-modelproxy/tst_proxy.cpp
index 9d5cea90..65856191 100644
--- a/tests/auto/cpptest/q3dscatter-modelproxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dscatter-modelproxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -120,9 +120,9 @@ void tst_proxy::initializeProperties()
{
QVERIFY(m_proxy);
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
- m_proxy->setItemModel(table->model());
+ m_proxy->setItemModel(table.model());
m_proxy->setRotationRole("rotation");
m_proxy->setRotationRolePattern(QRegExp("/-/"));
m_proxy->setRotationRoleReplace("\\\\1");
@@ -153,26 +153,26 @@ void tst_proxy::initializeProperties()
void tst_proxy::addModel()
{
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
QStringList rows;
rows << "row 1";
QStringList columns;
columns << "col 1";
const char *values[1][2] = {{"0/0/5.5/30", "0/0/10.5/30"}};
- table->setRowCount(2);
- table->setColumnCount(1);
+ table.setRowCount(2);
+ table.setColumnCount(1);
for (int col = 0; col < columns.size(); col++) {
for (int row = 0; row < rows.size(); row++) {
- QModelIndex index = table->model()->index(col, row);
- table->model()->setData(index, values[col][row]);
+ QModelIndex index = table.model()->index(col, row);
+ table.model()->setData(index, values[col][row]);
}
}
- m_proxy->setItemModel(table->model());
- m_proxy->setXPosRole(table->model()->roleNames().value(Qt::DisplayRole));
- m_proxy->setZPosRole(table->model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setItemModel(table.model());
+ m_proxy->setXPosRole(table.model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setZPosRole(table.model()->roleNames().value(Qt::DisplayRole));
m_proxy->setXPosRolePattern(QRegExp(QStringLiteral("^(\\d*)\\/(\\d*)\\/\\d*[\\.\\,]?\\d*\\/\\d*[\\.\\,]?\\d*$")));
m_proxy->setXPosRoleReplace(QStringLiteral("\\2"));
m_proxy->setYPosRolePattern(QRegExp(QStringLiteral("^\\d*(\\/)(\\d*)\\/(\\d*[\\.\\,]?\\d*)\\/\\d*[\\.\\,]?\\d*$")));
@@ -187,6 +187,9 @@ void tst_proxy::addModel()
QCOMPARE(m_proxy->itemCount(), 2);
QVERIFY(m_proxy->series());
+
+ delete series;
+ m_proxy = 0; // proxy gets deleted with series
}
QTEST_MAIN(tst_proxy)
diff --git a/tests/auto/cpptest/q3dscatter-proxy/tst_proxy.cpp b/tests/auto/cpptest/q3dscatter-proxy/tst_proxy.cpp
index 436350dc..dea71e4c 100644
--- a/tests/auto/cpptest/q3dscatter-proxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dscatter-proxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dscatter-series/tst_series.cpp b/tests/auto/cpptest/q3dscatter-series/tst_series.cpp
index df290579..b30bec48 100644
--- a/tests/auto/cpptest/q3dscatter-series/tst_series.cpp
+++ b/tests/auto/cpptest/q3dscatter-series/tst_series.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dscatter/tst_scatter.cpp b/tests/auto/cpptest/q3dscatter/tst_scatter.cpp
index 5a3b6550..a433c932 100644
--- a/tests/auto/cpptest/q3dscatter/tst_scatter.cpp
+++ b/tests/auto/cpptest/q3dscatter/tst_scatter.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -81,7 +81,8 @@ void tst_scatter::construct()
QVERIFY(graph);
delete graph;
- graph = new Q3DScatter(new QSurfaceFormat());
+ QSurfaceFormat format;
+ graph = new Q3DScatter(&format);
QVERIFY(graph);
delete graph;
}
@@ -207,6 +208,8 @@ void tst_scatter::removeSeries()
m_graph->addSeries(series);
m_graph->removeSeries(series);
QCOMPARE(m_graph->seriesList().length(), 0);
+
+ delete series;
}
void tst_scatter::removeMultipleSeries()
@@ -231,6 +234,10 @@ void tst_scatter::removeMultipleSeries()
m_graph->removeSeries(series3);
QCOMPARE(m_graph->seriesList().length(), 0);
+
+ delete series;
+ delete series2;
+ delete series3;
}
QTEST_MAIN(tst_scatter)
diff --git a/tests/auto/cpptest/q3dscene-camera/tst_camera.cpp b/tests/auto/cpptest/q3dscene-camera/tst_camera.cpp
index ee321b22..3432a73f 100644
--- a/tests/auto/cpptest/q3dscene-camera/tst_camera.cpp
+++ b/tests/auto/cpptest/q3dscene-camera/tst_camera.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dscene-light/tst_light.cpp b/tests/auto/cpptest/q3dscene-light/tst_light.cpp
index 4568b01e..1b123e1e 100644
--- a/tests/auto/cpptest/q3dscene-light/tst_light.cpp
+++ b/tests/auto/cpptest/q3dscene-light/tst_light.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dscene/tst_scene.cpp b/tests/auto/cpptest/q3dscene/tst_scene.cpp
index 83eff9eb..bbd3dd71 100644
--- a/tests/auto/cpptest/q3dscene/tst_scene.cpp
+++ b/tests/auto/cpptest/q3dscene/tst_scene.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -127,12 +127,12 @@ void tst_scene::invalidProperties()
void tst_scene::subViews()
{
- Q3DBars *graph = new Q3DBars();
- graph->setPosition(QPoint(0, 0));
- graph->setWidth(200);
- graph->setHeight(200);
+ Q3DBars graph;
+ graph.setPosition(QPoint(0, 0));
+ graph.setWidth(200);
+ graph.setHeight(200);
- Q3DScene *scene = graph->scene();
+ Q3DScene *scene = graph.scene();
QCoreApplication::processEvents();
diff --git a/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
index 20ed1aeb..19ba7371 100644
--- a/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dsurface-heightproxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -66,7 +66,9 @@ void tst_proxy::construct()
QVERIFY(proxy);
delete proxy;
- proxy = new QHeightMapSurfaceDataProxy(QImage(QSize(10, 10), QImage::Format_ARGB32));
+ QImage image(QSize(10, 10), QImage::Format_ARGB32);
+ image.fill(0);
+ proxy = new QHeightMapSurfaceDataProxy(image);
QVERIFY(proxy);
QCoreApplication::processEvents();
QCOMPARE(proxy->columnCount(), 10);
diff --git a/tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp
index 6bef9478..c788da1e 100644
--- a/tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -70,13 +70,13 @@ void tst_proxy::construct()
QVERIFY(proxy);
delete proxy;
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
- proxy = new QItemModelSurfaceDataProxy(table->model());
+ proxy = new QItemModelSurfaceDataProxy(table.model());
QVERIFY(proxy);
delete proxy;
- proxy = new QItemModelSurfaceDataProxy(table->model(), "y");
+ proxy = new QItemModelSurfaceDataProxy(table.model(), "y");
QVERIFY(proxy);
QCOMPARE(proxy->rowRole(), QString(""));
QCOMPARE(proxy->columnRole(), QString(""));
@@ -87,7 +87,7 @@ void tst_proxy::construct()
QCOMPARE(proxy->columnCategories().length(), 0);
delete proxy;
- proxy = new QItemModelSurfaceDataProxy(table->model(), "row", "column", "y");
+ proxy = new QItemModelSurfaceDataProxy(table.model(), "row", "column", "y");
QVERIFY(proxy);
QCOMPARE(proxy->rowRole(), QString("row"));
QCOMPARE(proxy->columnRole(), QString("column"));
@@ -98,7 +98,7 @@ void tst_proxy::construct()
QCOMPARE(proxy->columnCategories().length(), 0);
delete proxy;
- proxy = new QItemModelSurfaceDataProxy(table->model(), "row", "column", "x", "y", "z");
+ proxy = new QItemModelSurfaceDataProxy(table.model(), "row", "column", "x", "y", "z");
QVERIFY(proxy);
QCOMPARE(proxy->rowRole(), QString("row"));
QCOMPARE(proxy->columnRole(), QString("column"));
@@ -109,7 +109,7 @@ void tst_proxy::construct()
QCOMPARE(proxy->columnCategories().length(), 0);
delete proxy;
- proxy = new QItemModelSurfaceDataProxy(table->model(), "row", "column", "y",
+ proxy = new QItemModelSurfaceDataProxy(table.model(), "row", "column", "y",
QStringList() << "rowCat", QStringList() << "colCat");
QVERIFY(proxy);
QCOMPARE(proxy->rowRole(), QString("row"));
@@ -121,7 +121,7 @@ void tst_proxy::construct()
QCOMPARE(proxy->columnCategories().length(), 1);
delete proxy;
- proxy = new QItemModelSurfaceDataProxy(table->model(), "row", "column", "x", "y", "z",
+ proxy = new QItemModelSurfaceDataProxy(table.model(), "row", "column", "x", "y", "z",
QStringList() << "rowCat", QStringList() << "colCat");
QVERIFY(proxy);
QCOMPARE(proxy->rowRole(), QString("row"));
@@ -172,7 +172,7 @@ void tst_proxy::initializeProperties()
{
QVERIFY(m_proxy);
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
m_proxy->setAutoColumnCategories(false);
m_proxy->setAutoRowCategories(false);
@@ -180,7 +180,7 @@ void tst_proxy::initializeProperties()
m_proxy->setColumnRole("column");
m_proxy->setColumnRolePattern(QRegExp("/^.*-(\\d\\d)$/"));
m_proxy->setColumnRoleReplace("\\\\1");
- m_proxy->setItemModel(table->model());
+ m_proxy->setItemModel(table.model());
m_proxy->setMultiMatchBehavior(QItemModelSurfaceDataProxy::MMBAverage);
m_proxy->setRowCategories(QStringList() << "row1" << "row2");
m_proxy->setRowRole("row");
@@ -223,9 +223,9 @@ void tst_proxy::initializeProperties()
void tst_proxy::multiMatch()
{
- Q3DSurface *graph = new Q3DSurface();
+ Q3DSurface graph;
- QTableWidget *table = new QTableWidget();
+ QTableWidget table;
QStringList rows;
rows << "row 1" << "row 2";
QStringList columns;
@@ -235,19 +235,19 @@ void tst_proxy::multiMatch()
{"1/0/5.5/30", "1/0/0.5/30"},
{"1/1/0.0/30", "1/1/0.0/30"}};
- table->setRowCount(2);
- table->setColumnCount(4);
+ table.setRowCount(2);
+ table.setColumnCount(4);
for (int col = 0; col < columns.size(); col++) {
for (int row = 0; row < rows.size(); row++) {
- QModelIndex index = table->model()->index(col, row);
- table->model()->setData(index, values[col][row]);
+ QModelIndex index = table.model()->index(col, row);
+ table.model()->setData(index, values[col][row]);
}
}
- m_proxy->setItemModel(table->model());
- m_proxy->setRowRole(table->model()->roleNames().value(Qt::DisplayRole));
- m_proxy->setColumnRole(table->model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setItemModel(table.model());
+ m_proxy->setRowRole(table.model()->roleNames().value(Qt::DisplayRole));
+ m_proxy->setColumnRole(table.model()->roleNames().value(Qt::DisplayRole));
m_proxy->setRowRolePattern(QRegExp(QStringLiteral("^(\\d*)\\/(\\d*)\\/\\d*[\\.\\,]?\\d*\\/\\d*[\\.\\,]?\\d*$")));
m_proxy->setRowRoleReplace(QStringLiteral("\\2"));
m_proxy->setYPosRolePattern(QRegExp(QStringLiteral("^\\d*(\\/)(\\d*)\\/(\\d*[\\.\\,]?\\d*)\\/\\d*[\\.\\,]?\\d*$")));
@@ -257,26 +257,28 @@ void tst_proxy::multiMatch()
QSurface3DSeries *series = new QSurface3DSeries(m_proxy);
- graph->addSeries(series);
+ graph.addSeries(series);
QCoreApplication::processEvents();
- QCOMPARE(graph->axisY()->max(), 10.5f);
+ QCOMPARE(graph.axisY()->max(), 10.5f);
m_proxy->setMultiMatchBehavior(QItemModelSurfaceDataProxy::MMBFirst);
QCoreApplication::processEvents();
- QCOMPARE(graph->axisY()->max(), 5.5f);
+ QCOMPARE(graph.axisY()->max(), 5.5f);
m_proxy->setMultiMatchBehavior(QItemModelSurfaceDataProxy::MMBLast);
QCoreApplication::processEvents();
- QCOMPARE(graph->axisY()->max(), 10.5f);
+ QCOMPARE(graph.axisY()->max(), 10.5f);
m_proxy->setMultiMatchBehavior(QItemModelSurfaceDataProxy::MMBAverage);
QCoreApplication::processEvents();
- QCOMPARE(graph->axisY()->max(), 8.0f);
+ QCOMPARE(graph.axisY()->max(), 8.0f);
m_proxy->setMultiMatchBehavior(QItemModelSurfaceDataProxy::MMBCumulativeY);
QCoreApplication::processEvents();
- QCOMPARE(graph->axisY()->max(), 16.0f);
+ QCOMPARE(graph.axisY()->max(), 16.0f);
QCOMPARE(m_proxy->columnCount(), 2);
QCOMPARE(m_proxy->rowCount(), 3);
QVERIFY(m_proxy->series());
+
+ m_proxy = 0; // Graph deletes proxy
}
QTEST_MAIN(tst_proxy)
diff --git a/tests/auto/cpptest/q3dsurface-proxy/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-proxy/tst_proxy.cpp
index 4274899d..3eda6819 100644
--- a/tests/auto/cpptest/q3dsurface-proxy/tst_proxy.cpp
+++ b/tests/auto/cpptest/q3dsurface-proxy/tst_proxy.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dsurface-series/tst_series.cpp b/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
index 50eed686..43a2bcee 100644
--- a/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
+++ b/tests/auto/cpptest/q3dsurface-series/tst_series.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
diff --git a/tests/auto/cpptest/q3dsurface/tst_surface.cpp b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
index 0ae0a326..101195e0 100644
--- a/tests/auto/cpptest/q3dsurface/tst_surface.cpp
+++ b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/
@@ -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)
diff --git a/tests/auto/cpptest/q3dtheme/tst_theme.cpp b/tests/auto/cpptest/q3dtheme/tst_theme.cpp
index 35945aef..dd3b3c73 100644
--- a/tests/auto/cpptest/q3dtheme/tst_theme.cpp
+++ b/tests/auto/cpptest/q3dtheme/tst_theme.cpp
@@ -2,17 +2,17 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://qt.io
**
-** This file is part of the QtDataVisualization module.
+** This file is part of the Qt Data Visualization module.
**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
+** Licensees holding valid commercial license for Qt may use this file in
+** accordance with the Qt License Agreement provided with the Software
+** or, alternatively, in accordance with the terms contained in a written
+** agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://qt.io
**
****************************************************************************/