summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-12-07 23:04:03 (GMT)
committerBill King <bill.king@nokia.com>2009-12-07 23:04:03 (GMT)
commit12b032ca7c79955f03f744bdb8f7b0d60e222e40 (patch)
treeecdbf6e63fa2b2c507337c102f597c0462d78117 /src/sql/kernel
parent0a4f8a73165da5ec274409dffa1de921421d9bb1 (diff)
downloadQt-12b032ca7c79955f03f744bdb8f7b0d60e222e40.zip
Qt-12b032ca7c79955f03f744bdb8f7b0d60e222e40.tar.gz
Qt-12b032ca7c79955f03f744bdb8f7b0d60e222e40.tar.bz2
Proper fix for QTBUG-6421
fixes setForwardOnly() for both OCI and SQLite Task-number: QTBUG-6421 Reviewed-by: Justin McPherson
Diffstat (limited to 'src/sql/kernel')
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index b4a9241..2e4d19e 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -278,6 +278,11 @@ bool QSqlCachedResult::cacheNext()
if (d->atEnd)
return false;
+ if(isForwardOnly()) {
+ d->cache.clear();
+ d->cache.resize(d->colCount);
+ }
+
if (!gotoNext(d->cache, d->nextIndex())) {
d->revertLast();
d->atEnd = true;