summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-22 08:38:59 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-22 08:38:59 (GMT)
commit252ea664604c85a5e993d28ee32d2aa0da7eca85 (patch)
tree0819bdd6e3614048faa8f2739299fb4be4301795 /src/sql/kernel
parent31ac8ea4a7a5360a01c2fc1f8f930ae8b236c94b (diff)
parentfe48ca11f7da7200c052a7825ad4d46319b13cc5 (diff)
downloadQt-252ea664604c85a5e993d28ee32d2aa0da7eca85.zip
Qt-252ea664604c85a5e993d28ee32d2aa0da7eca85.tar.gz
Qt-252ea664604c85a5e993d28ee32d2aa0da7eca85.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: doc/src/qnamespace.qdoc src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicsscene.cpp
Diffstat (limited to 'src/sql/kernel')
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp13
-rw-r--r--src/sql/kernel/qsqlcachedresult_p.h1
-rw-r--r--src/sql/kernel/qsqlresult.cpp2
3 files changed, 15 insertions, 1 deletions
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index 3cace06..ca51dc0 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -294,4 +294,17 @@ QSqlCachedResult::ValueCache &QSqlCachedResult::cache()
return d->cache;
}
+void QSqlCachedResult::virtual_hook(int id, void *data)
+{
+ switch (id) {
+ case QSqlResult::DetachFromResultSet:
+ case QSqlResult::SetNumericalPrecision:
+ cleanup();
+ break;
+ default:
+ QSqlResult::virtual_hook(id, data);
+ }
+}
+
+
QT_END_NAMESPACE
diff --git a/src/sql/kernel/qsqlcachedresult_p.h b/src/sql/kernel/qsqlcachedresult_p.h
index d19435c..a384b2e 100644
--- a/src/sql/kernel/qsqlcachedresult_p.h
+++ b/src/sql/kernel/qsqlcachedresult_p.h
@@ -89,6 +89,7 @@ protected:
int colCount() const;
ValueCache &cache();
+ void virtual_hook(int id, void *data);
private:
bool cacheNext();
QSqlCachedResultPrivate *d;
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 1c1595d..93c9d9f 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -905,7 +905,6 @@ QVariant QSqlResult::lastInsertId() const
*/
void QSqlResult::virtual_hook(int, void *)
{
- Q_ASSERT(false);
}
/*! \internal
@@ -971,6 +970,7 @@ void QSqlResult::detachFromResultSet()
void QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy)
{
d->precisionPolicy = policy;
+ virtual_hook(SetNumericalPrecision, &policy);
}
/*! \internal