title: QSqlQuery for SQLite in forward iteration with next() will only find one row
body: <p>The following problem has been discussed from time to time. However there was never a solution for the problem it self. As I found out there is a difference in iterating rows forward and backward. Forward iteration with <code>QSqlQuery::next()</code> <strong>may</strong> result in only one row, however backward iteration with <code>QSqlQuery::previous()</code> will <strong>always</strong> find all rows. Whether forward iteration is set explicitely or not, has no effect.</p>
  
  <p><strong>Edit:</strong> <em>References removed</em></p>
  
  <p>Concerning Qt documentation the right approach would be following:</p>
  
  <pre><code>QSqlQuery q = db.exec("SELECT * FROM Table");
  while (q.next()) {
      // Do something with row...
  }
  </code></pre>
  
  <p>However this will result in only one row. Backward iteration will find all rows.</p>
  
  <pre><code>QSqlQuery q = db.exec("SELECT * FROM Table");
  if (q.last()) {
      do {
          // Do something with row...
      } while (q.previous());
  }
  </code></pre>
  
  <p>Backward iteration could be very slow and should be avoided. Has anyone an idea why this does not work in forward iteration?</p>
  
  <p><strong>Edit:</strong> This behavior is not always reproduceable to me and sometimes it happens, sometimes not. The database contains <strong>more</strong> than one row in this case. The problem occurs exactly in this code snippets. Is there any one with the same problem?</p>
  
  <p><strong>Edit 2:</strong> It seems that the bug has been fixed in Qt 4.8.5.</p>
  
  <p>My current environment: Windows 7 (SP1), Qt 4.8.5.</p>