summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 0509d49..4a749f0 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -2596,7 +2596,11 @@ class QtTestModel: public QAbstractItemModel
}
void fetchMore(const QModelIndex &idx) {
+ if (fetched.contains(idx))
+ return;
+ beginInsertRows(idx, 0, rows-1);
fetched.insert(idx);
+ endInsertRows();
}
bool hasChildren(const QModelIndex & = QModelIndex()) const {
@@ -2607,7 +2611,7 @@ class QtTestModel: public QAbstractItemModel
return fetched.contains(parent) ? rows : 0;
}
int columnCount(const QModelIndex& parent = QModelIndex()) const {
- return fetched.contains(parent) ? cols : 0;
+ return cols;
}
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const