From 26af3b384094bcb9f9f844e21f5770e595805398 Mon Sep 17 00:00:00 2001 From: Derick Hawcroft Date: Tue, 18 Aug 2009 07:45:01 +1000 Subject: Fix qsqltablemodel autotest test was broken Reviewed-by:Bill King --- tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index f6796c0..a201956 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -280,8 +280,9 @@ void tst_QSqlTableModel::setRecord() QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QList policies = QList() << QSqlTableModel::OnFieldChange << QSqlTableModel::OnRowChange << QSqlTableModel::OnManualSubmit; + QList policies = QList() << QSqlTableModel::OnFieldChange << QSqlTableModel::OnManualSubmit << QSqlTableModel::OnRowChange; + QString x; foreach( QSqlTableModel::EditStrategy submitpolicy, policies) { QSqlTableModel model(0, db); @@ -308,11 +309,11 @@ void tst_QSqlTableModel::setRecord() QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, 1)); } } - - QCOMPARE(model.data(model.index(0, 1)).toString(), QString("fooX")); - QCOMPARE(model.data(model.index(0, 2)).toString(), QString("barX")); - QCOMPARE(model.data(model.index(1, 1)).toString(), QString("bazX")); - QCOMPARE(model.data(model.index(1, 2)).toString(), QString("joeX")); + x+=QString('X'); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("foo")+x); + QCOMPARE(model.data(model.index(0, 2)).toString(), QString("bar")+x); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("baz")+x); + QCOMPARE(model.data(model.index(1, 2)).toString(), QString("joe")+x); } } -- cgit v0.12