From 0c863b2e2cc7f5be6baa918c8fffb0ee44c02cc7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Feb 2015 13:20:34 +0300 Subject: Add missing override keywords. --- src/gui/models/colorlistmodel.h | 4 ++-- src/gui/models/modelistmodel.h | 2 +- src/gui/models/sortlistmodelbuy.h | 4 ++-- src/gui/models/userstablemodel.h | 11 ++++++----- 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src/gui/models') diff --git a/src/gui/models/colorlistmodel.h b/src/gui/models/colorlistmodel.h index 05f935c69..b50d5879d 100644 --- a/src/gui/models/colorlistmodel.h +++ b/src/gui/models/colorlistmodel.h @@ -65,12 +65,12 @@ class ColorListModel final : public ListModel ~ColorListModel() { } - int getNumberOfElements() + int getNumberOfElements() override final { return 14; } - std::string getElementAt(int i) + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/modelistmodel.h b/src/gui/models/modelistmodel.h index 05b82b36d..233221f75 100644 --- a/src/gui/models/modelistmodel.h +++ b/src/gui/models/modelistmodel.h @@ -48,7 +48,7 @@ class ModeListModel final : public ListModel /** * Returns element from container. */ - std::string getElementAt(int i) + std::string getElementAt(int i) override final { return mVideoModes[i]; } /** diff --git a/src/gui/models/sortlistmodelbuy.h b/src/gui/models/sortlistmodelbuy.h index 4e42e548e..f76263cef 100644 --- a/src/gui/models/sortlistmodelbuy.h +++ b/src/gui/models/sortlistmodelbuy.h @@ -51,10 +51,10 @@ class SortListModelBuy final : public ListModel ~SortListModelBuy() { } - int getNumberOfElements() + int getNumberOfElements() override final { return 7; } - std::string getElementAt(int i) + std::string getElementAt(int i) override final { if (i >= getNumberOfElements() || i < 0) return "???"; diff --git a/src/gui/models/userstablemodel.h b/src/gui/models/userstablemodel.h index 801ef3595..2f6201024 100644 --- a/src/gui/models/userstablemodel.h +++ b/src/gui/models/userstablemodel.h @@ -70,22 +70,22 @@ class UsersTableModel final : public TableModel, freeWidgets(); } - int getRows() const + int getRows() const override final { return static_cast(mPlayers.size()); } - int getColumns() const + int getColumns() const override final { return COLUMNS_NR; } - int getRowHeight() const + int getRowHeight() const override final { return ROW_HEIGHT; } - int getColumnWidth(const int index) const + int getColumnWidth(const int index) const override final { if (index == NAME_COLUMN) return NAME_COLUMN_WIDTH; @@ -234,7 +234,8 @@ class UsersTableModel final : public TableModel, { } - Widget *getElementAt(const int row, const int column) const + Widget *getElementAt(const int row, + const int column) const override final { return mWidgets[WIDGET_AT(row, column)]; } -- cgit v1.2.3-70-g09d2