aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qquickheaderview/tst_qquickheaderview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qquickheaderview/tst_qquickheaderview.cpp b/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
index d8d71183..14e0bb79 100644
--- a/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
+++ b/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
@@ -58,8 +58,10 @@ public:
{
}
- int rowCount(const QModelIndex & = QModelIndex()) const override
+ int rowCount(const QModelIndex &index = QModelIndex()) const override
{
+ if (index.isValid())
+ return 0;
return m_rows;
}
virtual void setRowCount(int count)
@@ -70,8 +72,10 @@ public:
endResetModel();
}
- int columnCount(const QModelIndex & = QModelIndex()) const override
+ int columnCount(const QModelIndex &index = QModelIndex()) const override
{
+ if (index.isValid())
+ return 0;
return m_cols;
}
virtual void setColumnCount(int count)