summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorDerick Hawcroft <derick.hawcroft@nokia.com>2009-06-29 00:59:04 (GMT)
committerDerick Hawcroft <derick.hawcroft@nokia.com>2009-06-29 01:02:58 (GMT)
commit4efa1ba22825fb9a8be572dbf595cb29a4e4840b (patch)
tree6a781c6cc1ad84a1f7924a1f3f9af154402e2520 /src/sql
parente851be3ae78b54cd5b0391436563dcc81c6e8817 (diff)
downloadQt-4efa1ba22825fb9a8be572dbf595cb29a4e4840b.zip
Qt-4efa1ba22825fb9a8be572dbf595cb29a4e4840b.tar.gz
Qt-4efa1ba22825fb9a8be572dbf595cb29a4e4840b.tar.bz2
bug fix
Task-number: 217003 Reviewed-by: Bill King
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index 3cace06..4b094c6 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -184,8 +184,11 @@ bool QSqlCachedResult::fetch(int i)
if (d->rowCacheEnd > 0)
setAt(d->cacheCount());
while (at() < i + 1) {
- if (!cacheNext())
+ if (!cacheNext()) {
+ if (d->canSeek(i))
+ break;
return false;
+ }
}
setAt(i);