diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2021-03-10 16:01:20 +0100 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2021-03-10 23:21:32 +0100 |
commit | d0ba43f0f58f63ec43f4f2d6cb368d07b55a550f (patch) | |
tree | 290f673698e622f0e0fc84a4cb4d27d7054901ba /tests/benchmarks/widgets/itemviews/qtableview | |
parent | 346d30144a3d110eb5b0b1dd1902c72fafa794e2 (diff) |
Fix warnings about marking functions override
Change-Id: I7737469d3016f9522e497b443edd864fa4d714cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/benchmarks/widgets/itemviews/qtableview')
-rw-r--r-- | tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp index 007f12516f..157ee7a152 100644 --- a/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -45,11 +45,11 @@ public: row_count(rows), column_count(columns) {} - int rowCount(const QModelIndex& = QModelIndex()) const { return row_count; } - int columnCount(const QModelIndex& = QModelIndex()) const { return column_count; } + int rowCount(const QModelIndex & = QModelIndex()) const override { return row_count; } + int columnCount(const QModelIndex & = QModelIndex()) const override { return column_count; } bool isEditable(const QModelIndex &) const { return true; } - QVariant data(const QModelIndex &idx, int role) const + QVariant data(const QModelIndex &idx, int role) const override { if (!idx.isValid() || idx.row() >= row_count || idx.column() >= column_count) { qWarning() << "Invalid modelIndex [%d,%d,%p]" << idx; @@ -62,7 +62,7 @@ public: return QVariant(); } - bool insertRows(int start, int count, const QModelIndex &parent = QModelIndex()) + bool insertRows(int start, int count, const QModelIndex &parent = QModelIndex()) override { if (start < 0 || start > row_count) return false; @@ -73,7 +73,7 @@ public: return true; } - bool removeRows(int start, int count, const QModelIndex &parent = QModelIndex()) + bool removeRows(int start, int count, const QModelIndex &parent = QModelIndex()) override { if (start < 0 || start >= row_count || row_count < count) return false; @@ -84,7 +84,7 @@ public: return true; } - bool insertColumns(int start, int count, const QModelIndex &parent = QModelIndex()) + bool insertColumns(int start, int count, const QModelIndex &parent = QModelIndex()) override { if (start < 0 || start > column_count) return false; @@ -95,7 +95,7 @@ public: return true; } - bool removeColumns(int start, int count, const QModelIndex &parent = QModelIndex()) + bool removeColumns(int start, int count, const QModelIndex &parent = QModelIndex()) override { if (start < 0 || start >= column_count || column_count < count) return false; |