diff options
author | Derick Hawcroft <derick.hawcroft@nokia.com> | 2009-08-17 21:45:01 (GMT) |
---|---|---|
committer | Derick Hawcroft <derick.hawcroft@nokia.com> | 2009-08-17 21:46:29 (GMT) |
commit | 26af3b384094bcb9f9f844e21f5770e595805398 (patch) | |
tree | 3a76a4a8fcd135ed3abea7d9226fda17fd07ca7c /tests | |
parent | 8309d2254d7ee08dfcfd230c21d1e4e1009dc405 (diff) | |
download | Qt-26af3b384094bcb9f9f844e21f5770e595805398.zip Qt-26af3b384094bcb9f9f844e21f5770e595805398.tar.gz Qt-26af3b384094bcb9f9f844e21f5770e595805398.tar.bz2 |
Fix qsqltablemodel autotest
test was broken
Reviewed-by:Bill King
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 13 |
1 files 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<QSqlTableModel::EditStrategy> policies = QList<QSqlTableModel::EditStrategy>() << QSqlTableModel::OnFieldChange << QSqlTableModel::OnRowChange << QSqlTableModel::OnManualSubmit; + QList<QSqlTableModel::EditStrategy> policies = QList<QSqlTableModel::EditStrategy>() << 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<QModelIndex>(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); } } |