summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqltablemodel
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-06-15 00:28:47 (GMT)
committerBill King <bill.king@nokia.com>2009-06-15 03:09:19 (GMT)
commitb8430baeadd62b643ff07a2588c62141146c08fd (patch)
treedc2d7d5e0add68df3b60b67faeaa778617b76ced /tests/auto/qsqltablemodel
parent16fe846058aa0a89577660d18bdc0aceda7fecfd (diff)
downloadQt-b8430baeadd62b643ff07a2588c62141146c08fd.zip
Qt-b8430baeadd62b643ff07a2588c62141146c08fd.tar.gz
Qt-b8430baeadd62b643ff07a2588c62141146c08fd.tar.bz2
BT Revert "Fix the behaviour of sql classes regarding quoted identifiers"
This reverts commit bb7bddc47dd0748b45d22180d9e3c8e5209010b3 due to forward binary compatibility issues in a point release.
Diffstat (limited to 'tests/auto/qsqltablemodel')
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
index 0e7355e..d4affe4 100644
--- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -145,7 +145,7 @@ void tst_QSqlTableModel::dropTestTables()
<< qTableName("bigtable")
<< qTableName("foo");
if (testWhiteSpaceNames(db.driverName()))
- tableNames << qTableName("qtestw hitespace", db.driver());
+ tableNames << qTableName("qtestw hitespace");
tst_Databases::safeDropTables(db, tableNames);
@@ -277,7 +277,6 @@ void tst_QSqlTableModel::setRecord()
QList<QSqlTableModel::EditStrategy> policies = QList<QSqlTableModel::EditStrategy>() << QSqlTableModel::OnFieldChange << QSqlTableModel::OnRowChange << QSqlTableModel::OnManualSubmit;
- QString Xsuffix;
foreach( QSqlTableModel::EditStrategy submitpolicy, policies) {
QSqlTableModel model(0, db);
@@ -296,8 +295,6 @@ void tst_QSqlTableModel::setRecord()
if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnManualSubmit)
QVERIFY(model.submitAll());
- else if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnRowChange && i == model.rowCount() -1)
- model.submit();
else {
// dataChanged() is not emitted when submitAll() is called
QCOMPARE(spy.count(), 2);
@@ -307,12 +304,10 @@ void tst_QSqlTableModel::setRecord()
}
}
- Xsuffix.append('X');
-
- QCOMPARE(model.data(model.index(0, 1)).toString(), QString("foo").append(Xsuffix));
- QCOMPARE(model.data(model.index(0, 2)).toString(), QString("bar").append(Xsuffix));
- QCOMPARE(model.data(model.index(1, 1)).toString(), QString("baz").append(Xsuffix));
- QCOMPARE(model.data(model.index(1, 2)).toString(), QString("joe").append(Xsuffix));
+ 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"));
}
}