diff options
Diffstat (limited to 'tests/auto/qquickheaderview/tst_qquickheaderview.cpp')
-rw-r--r-- | tests/auto/qquickheaderview/tst_qquickheaderview.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qquickheaderview/tst_qquickheaderview.cpp b/tests/auto/qquickheaderview/tst_qquickheaderview.cpp index 611e39cb..f335aa86 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) |