summaryrefslogtreecommitdiff
path: root/src/sql/kernel
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-12-08 09:04:03 +1000
committerBill King <bill.king@nokia.com>2009-12-08 09:04:03 +1000
commit12b032ca7c79955f03f744bdb8f7b0d60e222e40 (patch)
treeecdbf6e63fa2b2c507337c102f597c0462d78117 /src/sql/kernel
parent0a4f8a73165da5ec274409dffa1de921421d9bb1 (diff)
downloadqt4-tools-12b032ca7c79955f03f744bdb8f7b0d60e222e40.tar.gz
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 b4a9241759..2e4d19ecc0 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;