fixed python scripts for next->rownumber Query change

This commit is contained in:
Jean-Francois Dockes
2012-12-22 15:58:45 +01:00
parent df53e7e656
commit 9eb77d032c
5 changed files with 17 additions and 15 deletions
+5 -6
View File
@@ -136,12 +136,11 @@ class RecollQuery(QtCore.QAbstractTableModel):
#print "RecollQuery.fetchMore:"
self.beginInsertRows(QtCore.QModelIndex(), len(self.docs), \
len(self.docs) + self.pagelen)
count = 0
while self.query.next >= 0 and self.query.next < self.totres \
and count < self.pagelen:
#print "Got: ", title.encode("utf-8")
self.docs.append(self.query.fetchone())
count += 1
for count in range(self.pagelen):
try:
self.docs.append(self.query.fetchone())
except:
break
self.endInsertRows()