summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-23 17:21:20 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-23 18:46:35 +0200
commitcd4593b108f7b308fb21f8b6451ba0a8da1cb169 (patch)
treee9bb082123c4b18b561ca714fd3f0123ca375219 /tests/manual
parent714c99c3a9fdb3ec04a81a5f5061e07b47c9200c (diff)
Use QList instead of QVector in qtcharts tests
Task-number: QTBUG-84469 Change-Id: I29790393aa11650842acd7b7c522554540270a18 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/barcharttester/chart-widget.h4
-rw-r--r--tests/manual/boxplottester/customtablemodel.cpp14
-rw-r--r--tests/manual/boxplottester/customtablemodel.h2
-rw-r--r--tests/manual/candlesticktester/customtablemodel.cpp6
-rw-r--r--tests/manual/candlesticktester/customtablemodel.h2
-rw-r--r--tests/manual/openglseriestest/datasource.cpp8
-rw-r--r--tests/manual/openglseriestest/datasource.h2
7 files changed, 19 insertions, 19 deletions
diff --git a/tests/manual/barcharttester/chart-widget.h b/tests/manual/barcharttester/chart-widget.h
index 0b788172..8f8fe0d8 100644
--- a/tests/manual/barcharttester/chart-widget.h
+++ b/tests/manual/barcharttester/chart-widget.h
@@ -62,8 +62,8 @@ private:
QChartView *m_chartView;
QAbstractAxis *m_barAxis;
QAbstractAxis *m_valueAxis;
- QVector<QAbstractBarSeries *> m_series;
- QMap<const QAbstractBarSeries *, QVector<QBarSet *> > m_sets;
+ QList<QAbstractBarSeries *> m_series;
+ QMap<const QAbstractBarSeries *, QList<QBarSet *>> m_sets;
QTimer m_timer;
QElapsedTimer m_elapsedTimer;
QHBoxLayout *m_horizontalLayout;
diff --git a/tests/manual/boxplottester/customtablemodel.cpp b/tests/manual/boxplottester/customtablemodel.cpp
index b111165d..6d21f5b0 100644
--- a/tests/manual/boxplottester/customtablemodel.cpp
+++ b/tests/manual/boxplottester/customtablemodel.cpp
@@ -28,7 +28,7 @@
****************************************************************************/
#include "customtablemodel.h"
-#include <QtCore/QVector>
+#include <QtCore/QList>
#include <QtCore/QTime>
#include <QtCore/QRect>
#include <QtGui/QColor>
@@ -40,7 +40,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
{
m_columnCount = 6;
m_rowCount = 5;
- QVector<qreal>* dataVec_Jan = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_Jan = new QList<qreal>(m_rowCount);
dataVec_Jan->insert(0, 3.0);
dataVec_Jan->insert(1, 4.0);
dataVec_Jan->insert(2, 4.4);
@@ -48,7 +48,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
dataVec_Jan->insert(4, 7.0);
m_data.append(dataVec_Jan);
- QVector<qreal>* dataVec_Feb = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_Feb = new QList<qreal>(m_rowCount);
dataVec_Feb->insert(0, 5.0);
dataVec_Feb->insert(1, 6.0);
dataVec_Feb->insert(2, 7.5);
@@ -56,7 +56,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
dataVec_Feb->insert(4, 12.0);
m_data.append(dataVec_Feb);
- QVector<qreal>* dataVec_Mar = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_Mar = new QList<qreal>(m_rowCount);
dataVec_Mar->insert(0, 3.0);
dataVec_Mar->insert(1, 4.0);
dataVec_Mar->insert(2, 5.7);
@@ -64,7 +64,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
dataVec_Mar->insert(4, 9.0);
m_data.append(dataVec_Mar);
- QVector<qreal>* dataVec_Apr = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_Apr = new QList<qreal>(m_rowCount);
dataVec_Apr->insert(0, 5.0);
dataVec_Apr->insert(1, 6.0);
dataVec_Apr->insert(2, 6.8);
@@ -72,7 +72,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
dataVec_Apr->insert(4, 8.0);
m_data.append(dataVec_Apr);
- QVector<qreal>* dataVec_May = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_May = new QList<qreal>(m_rowCount);
dataVec_May->insert(0, 4.0);
dataVec_May->insert(1, 5.0);
dataVec_May->insert(2, 5.2);
@@ -80,7 +80,7 @@ CustomTableModel::CustomTableModel(QObject *parent) :
dataVec_May->insert(4, 7.0);
m_data.append(dataVec_May);
- QVector<qreal>* dataVec_Jun = new QVector<qreal>(m_rowCount);
+ QList<qreal> *dataVec_Jun = new QList<qreal>(m_rowCount);
dataVec_Jun->insert(0, 4.0);
dataVec_Jun->insert(1, 7.0);
dataVec_Jun->insert(2, 8.2);
diff --git a/tests/manual/boxplottester/customtablemodel.h b/tests/manual/boxplottester/customtablemodel.h
index 196ab204..1c14b93e 100644
--- a/tests/manual/boxplottester/customtablemodel.h
+++ b/tests/manual/boxplottester/customtablemodel.h
@@ -52,7 +52,7 @@ public:
void clearMapping() { m_mapping.clear(); }
private:
- QList<QVector<qreal> *> m_data;
+ QList<QList<qreal> *> m_data;
QMultiHash<QString, QRect> m_mapping;
int m_columnCount;
int m_rowCount;
diff --git a/tests/manual/candlesticktester/customtablemodel.cpp b/tests/manual/candlesticktester/customtablemodel.cpp
index e0122429..ae995b22 100644
--- a/tests/manual/candlesticktester/customtablemodel.cpp
+++ b/tests/manual/candlesticktester/customtablemodel.cpp
@@ -29,7 +29,7 @@
#include <QtCharts/QCandlestickSet>
#include <QtCore/QRect>
-#include <QtCore/QVector>
+#include <QtCore/QList>
#include <QtGui/QColor>
#include "customtablemodel.h"
@@ -112,7 +112,7 @@ Qt::ItemFlags CustomTableModel::flags(const QModelIndex &index) const
bool CustomTableModel::insertRows(int row, int count, const QModelIndex &parent)
{
beginInsertRows(parent, row, row + count - 1);
- m_data.append(new QVector<qreal>(columnCount()));
+ m_data.append(new QList<qreal>(columnCount()));
endInsertRows();
return true;
@@ -133,7 +133,7 @@ void CustomTableModel::addRow(QCandlestickSet *set)
bool changed = insertRows(m_data.count(), 1);
if (changed) {
- QVector<qreal> *row = m_data.last();
+ QList<qreal> *row = m_data.last();
row->insert(0, set->timestamp());
row->insert(1, set->open());
row->insert(2, set->high());
diff --git a/tests/manual/candlesticktester/customtablemodel.h b/tests/manual/candlesticktester/customtablemodel.h
index 4a8965c3..fe332f1a 100644
--- a/tests/manual/candlesticktester/customtablemodel.h
+++ b/tests/manual/candlesticktester/customtablemodel.h
@@ -66,7 +66,7 @@ public:
private:
QStringList m_categories;
- QList<QVector<qreal> *> m_data;
+ QList<QList<qreal> *> m_data;
QHash<QString, QRect> m_mapping;
};
diff --git a/tests/manual/openglseriestest/datasource.cpp b/tests/manual/openglseriestest/datasource.cpp
index dbf6874c..4d29fd3d 100644
--- a/tests/manual/openglseriestest/datasource.cpp
+++ b/tests/manual/openglseriestest/datasource.cpp
@@ -42,13 +42,13 @@ DataSource::DataSource(QObject *parent) :
void DataSource::update(QXYSeries *series, int seriesIndex)
{
if (series) {
- const QVector<QVector<QPointF> > &seriesData = m_data.at(seriesIndex);
+ const QList<QList<QPointF>> &seriesData = m_data.at(seriesIndex);
if (seriesIndex == 0)
m_index++;
if (m_index > seriesData.count() - 1)
m_index = 0;
- QVector<QPointF> points = seriesData.at(m_index);
+ QList<QPointF> points = seriesData.at(m_index);
// Use replace instead of clear + append, it's optimized for performance
series->replace(points);
}
@@ -102,7 +102,7 @@ void DataSource::startUpdates(QList<QXYSeries *> &seriesList, QLabel *fpsLabel,
void DataSource::generateData(int seriesIndex, int rowCount, int colCount)
{
// Remove previous data
- QVector<QVector<QPointF> > &seriesData = m_data[seriesIndex];
+ QList<QList<QPointF>> &seriesData = m_data[seriesIndex];
seriesData.clear();
seriesData.reserve(rowCount);
@@ -112,7 +112,7 @@ void DataSource::generateData(int seriesIndex, int rowCount, int colCount)
// Append the new data depending on the type
qreal height = qreal(seriesIndex) * (10.0 / qreal(maxSeriesCount)) + 0.3;
for (int i(0); i < rowCount; i++) {
- QVector<QPointF> points;
+ QList<QPointF> points;
points.reserve(colCount);
for (int j(0); j < colCount; j++) {
qreal x(0);
diff --git a/tests/manual/openglseriestest/datasource.h b/tests/manual/openglseriestest/datasource.h
index 6b31c6da..932c9289 100644
--- a/tests/manual/openglseriestest/datasource.h
+++ b/tests/manual/openglseriestest/datasource.h
@@ -56,7 +56,7 @@ public slots:
void setInterval(int interval);
private:
- QVector<QVector<QVector<QPointF> > > m_data;
+ QList<QList<QList<QPointF>>> m_data;
int m_index;
QList<QXYSeries *> *m_seriesList;
QLabel *m_fpsLabel;