[QSqlQuery] misbehavior of seek in special query positions
authorIsrael Lins Albuquerque <israel@proabakus.com.br>
Tue, 15 Apr 2014 20:37:18 +0000 (17:37 -0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 26 Apr 2014 18:22:42 +0000 (20:22 +0200)
commit3e6e70bddd84536deaae69421d05785ae6ce28cd
tree227484a53c825f5ec17e9a4069d85bc460d4e861
parenta2ad5cf1aadd5a3bec09595be7e8611abab31bb6
[QSqlQuery] misbehavior of seek in special query positions

When QSqlQuery::at() == QSql::BeforeFirstRow and seek(1, true) (seek to
next record) is called the expected result is go to first row.
When QSqlQuery::at() == QSql::AfterLastRow and seek(-1, true) (seek to
previous record) is called the expected result is go to last row.

But in all cases the first and last are skipped.

Change-Id: I584138b3d397ce1c790bf89688ee92289a99611c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
src/sql/kernel/qsqlquery.cpp
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp