summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/drivers/sqlite')
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp17
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.h4
2 files changed, 8 insertions, 13 deletions
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 05d63ca..8e1091b 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtSql module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -115,13 +115,12 @@ public:
uint skipRow: 1; // skip the next fetchNext()?
uint utf8: 1;
QSqlRecord rInf;
- QSql::NumericalPrecisionPolicy precisionPolicy;
};
static const uint initial_cache_size = 128;
QSQLiteResultPrivate::QSQLiteResultPrivate(QSQLiteResult* res) : q(res), access(0),
- stmt(0), skippedStatus(false), skipRow(false), utf8(false), precisionPolicy(QSql::HighPrecision)
+ stmt(0), skippedStatus(false), skipRow(false), utf8(false)
{
}
@@ -212,7 +211,7 @@ bool QSQLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int i
values[i + idx] = sqlite3_column_int64(stmt, i);
break;
case SQLITE_FLOAT:
- switch(precisionPolicy) {
+ switch(q->numericalPrecisionPolicy()) {
case QSql::LowPrecisionInt32:
values[i + idx] = sqlite3_column_int(stmt, i);
break;
@@ -289,12 +288,8 @@ void QSQLiteResult::virtual_hook(int id, void *data)
if (d->stmt)
sqlite3_reset(d->stmt);
break;
- case QSqlResult::SetNumericalPrecision:
- Q_ASSERT(data);
- d->precisionPolicy = *reinterpret_cast<QSql::NumericalPrecisionPolicy *>(data);
- break;
default:
- QSqlResult::virtual_hook(id, data);
+ QSqlCachedResult::virtual_hook(id, data);
}
}
@@ -481,11 +476,11 @@ bool QSQLiteDriver::hasFeature(DriverFeature f) const
case PositionalPlaceholders:
case SimpleLocking:
case FinishQuery:
+ case LowPrecisionNumbers:
return true;
case QuerySize:
case NamedPlaceholders:
case BatchOperations:
- case LowPrecisionNumbers:
case EventNotifications:
case MultipleResultSets:
return false;
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.h b/src/sql/drivers/sqlite/qsql_sqlite.h
index 459ea3b..481c2d2 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.h
+++ b/src/sql/drivers/sqlite/qsql_sqlite.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtSql module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/