From d0ba43f0f58f63ec43f4f2d6cb368d07b55a550f Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Wed, 10 Mar 2021 16:01:20 +0100 Subject: Fix warnings about marking functions override Change-Id: I7737469d3016f9522e497b443edd864fa4d714cc Reviewed-by: Volker Hilsheimer --- .../widgets/itemviews/qtableview/tst_qtableview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/benchmarks/widgets/itemviews/qtableview') 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; -- cgit v1.2.3