Revert "don't canFetchMore on our own"

This reverts commit b9af3706e7.

As explained MKleusberg, this might be needed, and this practise
is also used by Qt itself.
This commit is contained in:
Peinthor Rene
2013-04-16 19:57:03 +02:00
parent a7fd9f600e
commit c0441dcd97

View File

@@ -130,6 +130,10 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole)
{
// If this row is not in the cache yet get it first
while(index.row() >= m_data.size() && canFetchMore())
const_cast<SqliteTableModel*>(this)->fetchMore(); // Nothing evil to see here, move along
return m_data.at(index.row()).at(index.column());
} else {
return QVariant();