diff options
author | Bill King <bill.king@nokia.com> | 2009-06-12 00:29:44 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-06-15 00:31:07 (GMT) |
commit | c9f77564df14f91276e9ca693a9b3f339dab9334 (patch) | |
tree | 5c87e861a3973433c2b01ece730164d63a5dab95 /src/sql/drivers/sqlite2 | |
parent | ba097c23159c1ec026b8b8772d1a9c5e72f2a681 (diff) | |
download | Qt-c9f77564df14f91276e9ca693a9b3f339dab9334.zip Qt-c9f77564df14f91276e9ca693a9b3f339dab9334.tar.gz Qt-c9f77564df14f91276e9ca693a9b3f339dab9334.tar.bz2 |
Stage 1 of incorporating database level precision policy.
Queries now ask the database object what precision they should be,
allows for setting precision policies on sql models, where previously
this was not available. Also fixes some failing precisionpolicy implementations,
as well as working around the fact qstring can't convert from "123.00" to
an int based type.
Diffstat (limited to 'src/sql/drivers/sqlite2')
-rw-r--r-- | src/sql/drivers/sqlite2/qsql_sqlite2.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index cb72ff0..bd7c367 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -114,13 +114,12 @@ public: uint skipRow: 1; // skip the next fetchNext()? uint utf8: 1; QSqlRecord rInf; - QSql::NumericalPrecisionPolicy precisionPolicy; }; static const uint initial_cache_size = 128; QSQLite2ResultPrivate::QSQLite2ResultPrivate(QSQLite2Result* res) : q(res), access(0), currentTail(0), - currentMachine(0), skippedStatus(false), skipRow(false), utf8(false), precisionPolicy(QSql::HighPrecision) + currentMachine(0), skippedStatus(false), skipRow(false), utf8(false) { } @@ -260,10 +259,6 @@ void QSQLite2Result::virtual_hook(int id, void *data) case QSqlResult::DetachFromResultSet: d->finalize(); break; - case QSqlResult::SetNumericalPrecision: - Q_ASSERT(data); - d->precisionPolicy = *reinterpret_cast<QSql::NumericalPrecisionPolicy *>(data); - break; default: QSqlResult::virtual_hook(id, data); } |