summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-10-16 09:38:32 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-10-16 09:38:32 +0200
commit73d797cda0579f18ef4ef837a6384315619b50be (patch)
treed6ef7b983ff14f68a32808fd4b49c08730380092 /tests/auto
parent88e67e7686fa564e81a770a18879cc281e620222 (diff)
parentfe9066461afd36fc9611db11f95f4c43f645b96e (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta2
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp b/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp
index cf3531ed..a9ac4837 100644
--- a/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp
+++ b/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp
@@ -425,14 +425,23 @@ void tst_qcandlestickmodelmapper::seriesUpdated()
QList<QCandlestickSet *> newCandlestickSets;
newCandlestickSets << new QCandlestickSet(3.0, 5.0, 2.0, 4.0, 1234);
newCandlestickSets << new QCandlestickSet(5.0, 7.0, 4.0, 6.0, 5678);
+ newCandlestickSets << new QCandlestickSet(3.0, 8.0, 4.0, 6.0, 6789);
m_series->append(newCandlestickSets);
QCOMPARE(m_model->columnCount(), m_modelColumnCount + newCandlestickSets.count());
// remove sets
newCandlestickSets.clear();
newCandlestickSets << m_series->sets().at(m_series->count() - 1);
- newCandlestickSets << m_series->sets().at(m_series->count() - 2);
+ newCandlestickSets << m_series->sets().at(m_series->count() - 5);
+ newCandlestickSets << m_series->sets().at(m_series->count() - 3);
m_series->remove(newCandlestickSets);
+
+ // Make sure correct rows have been removed from model
+ for (int i = 0, end = m_series->sets().size(); i < end; ++i) {
+ QCOMPARE(m_model->data(m_model->index(m_vMapper->timestampRow(), i)).toReal(),
+ m_series->sets().at(i)->timestamp());
+ }
+
QCOMPARE(m_model->columnCount(), m_modelColumnCount);
}