diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 17:14:06 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 20:01:55 +0200 |
commit | 2b1698862d93c4256ea4deae720d00269c448d5e (patch) | |
tree | c2bf3a2e5f75f334573d397abd9cc5a7ef382271 /examples/charts/qmloscilloscope/datasource.cpp | |
parent | cd4593b108f7b308fb21f8b6451ba0a8da1cb169 (diff) |
Use QList instead of QVector in qtcharts examples
Task-number: QTBUG-84469
Change-Id: I724c4d793294d890e26ff7d39021bbdc9438e978
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'examples/charts/qmloscilloscope/datasource.cpp')
-rw-r--r-- | examples/charts/qmloscilloscope/datasource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/charts/qmloscilloscope/datasource.cpp b/examples/charts/qmloscilloscope/datasource.cpp index b773217b..d01fa421 100644 --- a/examples/charts/qmloscilloscope/datasource.cpp +++ b/examples/charts/qmloscilloscope/datasource.cpp @@ -60,7 +60,7 @@ void DataSource::update(QAbstractSeries *series) if (m_index > m_data.count() - 1) m_index = 0; - QVector<QPointF> points = m_data.at(m_index); + QList<QPointF> points = m_data.at(m_index); // Use replace instead of clear + append, it's optimized for performance xySeries->replace(points); } @@ -73,7 +73,7 @@ void DataSource::generateData(int type, int rowCount, int colCount) // Append the new data depending on the type 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); |