diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-01 11:01:26 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-01 06:30:00 -0700 |
commit | 1c4a859c8d0b37b2e938209fe9c4d99e9758327a (patch) | |
tree | 06fc2083228ae3e40d47f09d3ee4a7ffd28f0d42 /qt-models | |
parent | 42aae8196f4c2114b7418d344dd2d33287f18070 (diff) | |
download | subsurface-1c4a859c8d0b37b2e938209fe9c4d99e9758327a.tar.gz |
Cleanup: remove all override modifiers
Commit df156a56c08a56eb380711a507ef739d8150a71f replaced "virtual"
by "override" where appropriate. Unfortunately, this had the
unintended consequence of producing numerous clang warnings. If
clang finds a override-modified function in a class definition,
it warns for *all* overriden virtual functions without the override
modifier.
To solve this, go the easy route and remove all overrides. At least
it is consistent.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/cleanertablemodel.h | 4 | ||||
-rw-r--r-- | qt-models/cylindermodel.h | 10 | ||||
-rw-r--r-- | qt-models/divecomputerextradatamodel.h | 4 | ||||
-rw-r--r-- | qt-models/divecomputermodel.h | 8 | ||||
-rw-r--r-- | qt-models/divepicturemodel.h | 6 | ||||
-rw-r--r-- | qt-models/diveplannermodel.h | 12 | ||||
-rw-r--r-- | qt-models/diveplotdatamodel.h | 8 | ||||
-rw-r--r-- | qt-models/divetripmodel.h | 12 | ||||
-rw-r--r-- | qt-models/filtermodels.h | 2 | ||||
-rw-r--r-- | qt-models/maplocationmodel.h | 6 | ||||
-rw-r--r-- | qt-models/messagehandlermodel.h | 6 | ||||
-rw-r--r-- | qt-models/models.h | 8 | ||||
-rw-r--r-- | qt-models/ssrfsortfilterproxymodel.h | 6 | ||||
-rw-r--r-- | qt-models/tankinfomodel.h | 8 | ||||
-rw-r--r-- | qt-models/treemodel.h | 10 | ||||
-rw-r--r-- | qt-models/weightmodel.h | 8 | ||||
-rw-r--r-- | qt-models/weightsysteminfomodel.h | 8 | ||||
-rw-r--r-- | qt-models/yearlystatisticsmodel.h | 2 |
18 files changed, 64 insertions, 64 deletions
diff --git a/qt-models/cleanertablemodel.h b/qt-models/cleanertablemodel.h index d435dad32..fc543f170 100644 --- a/qt-models/cleanertablemodel.h +++ b/qt-models/cleanertablemodel.h @@ -20,8 +20,8 @@ class CleanerTableModel : public QAbstractTableModel { Q_OBJECT public: explicit CleanerTableModel(QObject *parent = 0); - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; protected: void setHeaderDataStrings(const QStringList &headers); diff --git a/qt-models/cylindermodel.h b/qt-models/cylindermodel.h index c97eac179..1ec4c05ce 100644 --- a/qt-models/cylindermodel.h +++ b/qt-models/cylindermodel.h @@ -28,10 +28,10 @@ public: explicit CylindersModel(QObject *parent = 0); static CylindersModel *instance(); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - Qt::ItemFlags flags(const QModelIndex &index) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); void passInData(const QModelIndex &index, const QVariant &value); void add(); @@ -43,7 +43,7 @@ public: void moveAtFirst(int cylid); cylinder_t *cylinderAt(const QModelIndex &index); bool changed; - QVariant headerData(int section, Qt::Orientation orientation, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; public slots: diff --git a/qt-models/divecomputerextradatamodel.h b/qt-models/divecomputerextradatamodel.h index ab78e4541..562083afc 100644 --- a/qt-models/divecomputerextradatamodel.h +++ b/qt-models/divecomputerextradatamodel.h @@ -13,8 +13,8 @@ public: VALUE }; explicit ExtraDataModel(QObject *parent = 0); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; void clear(); void updateDive(); diff --git a/qt-models/divecomputermodel.h b/qt-models/divecomputermodel.h index 42e26d442..6d92646cf 100644 --- a/qt-models/divecomputermodel.h +++ b/qt-models/divecomputermodel.h @@ -15,10 +15,10 @@ public: NICKNAME }; DiveComputerModel(QObject *parent = 0); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - Qt::ItemFlags flags(const QModelIndex &index) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); void keepWorkingList(); public diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h index 6c9384c62..a1e117c39 100644 --- a/qt-models/divepicturemodel.h +++ b/qt-models/divepicturemodel.h @@ -20,9 +20,9 @@ class DivePictureModel : public QAbstractTableModel { Q_OBJECT public: static DivePictureModel *instance(); - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; void updateDivePictures(); void removePictures(const QVector<QString> &fileUrls); void updateDivePictureOffset(int diveId, const QString &filename, int offsetSeconds); diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 3ac5009fe..729b0ca93 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -26,12 +26,12 @@ public: PLAN, ADD }; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - Qt::ItemFlags flags(const QModelIndex &index) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + Qt::ItemFlags flags(const QModelIndex &index) const; void gasChange(const QModelIndex &index, int newcylinderid); void cylinderRenumber(int mapping[]); void removeSelectedPoints(const QVector<int> &rows); diff --git a/qt-models/diveplotdatamodel.h b/qt-models/diveplotdatamodel.h index 39074c7ac..fbf32ed84 100644 --- a/qt-models/diveplotdatamodel.h +++ b/qt-models/diveplotdatamodel.h @@ -72,10 +72,10 @@ public: COLUMNS }; explicit DivePlotDataModel(QObject *parent = 0); - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; void clear(); void setDive(struct dive *d, const plot_info &pInfo); const plot_info &data() const; diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h index 78951e5bd..fc17aff92 100644 --- a/qt-models/divetripmodel.h +++ b/qt-models/divetripmodel.h @@ -30,10 +30,10 @@ public: COLUMNS }; - QVariant data(int column, int role) const override; + QVariant data(int column, int role) const; int diveId; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - Qt::ItemFlags flags(const QModelIndex &index) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + Qt::ItemFlags flags(const QModelIndex &index) const; QString displayDate() const; QString displayDuration() const; QString displayDepth() const; @@ -52,7 +52,7 @@ public: struct TripItem : public TreeItem { Q_DECLARE_TR_FUNCTIONS(TripItem) public: - QVariant data(int column, int role) const override; + QVariant data(int column, int role) const; dive_trip_t *trip; }; @@ -94,8 +94,8 @@ public: }; Qt::ItemFlags flags(const QModelIndex &index) const; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); DiveTripModel(QObject *parent = 0); Layout layout() const; void setLayout(Layout layout); diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 2feb08988..1d950e735 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -92,7 +92,7 @@ class MultiFilterSortModel : public QSortFilterProxyModel { Q_OBJECT public: static MultiFilterSortModel *instance(); - bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; + bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; void addFilterModel(FilterModelBase *model); void removeFilterModel(FilterModelBase *model); int divesDisplayed; diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h index e198773a5..bfda83e90 100644 --- a/qt-models/maplocationmodel.h +++ b/qt-models/maplocationmodel.h @@ -56,8 +56,8 @@ public: ~MapLocationModel(); Q_INVOKABLE MapLocation *get(int row); - QVariant data(const QModelIndex &index, int role) const override; - int rowCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role) const; + int rowCount(const QModelIndex &parent) const; int count(); void add(MapLocation *); void addList(QVector<MapLocation *>); @@ -68,7 +68,7 @@ public: quint32 selectedUuid(); protected: - QHash<int, QByteArray> roleNames() const override; + QHash<int, QByteArray> roleNames() const; private: QVector<MapLocation *> m_mapLocations; diff --git a/qt-models/messagehandlermodel.h b/qt-models/messagehandlermodel.h index 3addee95f..ae46bf347 100644 --- a/qt-models/messagehandlermodel.h +++ b/qt-models/messagehandlermodel.h @@ -10,9 +10,9 @@ class MessageHandlerModel : public QAbstractListModel { public: static MessageHandlerModel *self(); enum MsgTypes {Message = Qt::UserRole + 1, Severity}; - int rowCount(const QModelIndex& parent = QModelIndex()) const override; - QVariant data(const QModelIndex& idx, int role) const override; - QHash<int, QByteArray> roleNames() const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + QVariant data(const QModelIndex& idx, int role) const; + QHash<int, QByteArray> roleNames() const; void addLog(QtMsgType type, const QString& message); const QString logAsString(); diff --git a/qt-models/models.h b/qt-models/models.h index f45c5e614..6140e702d 100644 --- a/qt-models/models.h +++ b/qt-models/models.h @@ -27,7 +27,7 @@ class GasSelectionModel : public QStringListModel { public: static GasSelectionModel *instance(); Qt::ItemFlags flags(const QModelIndex &index) const; - QVariant data(const QModelIndex &index, int role) const override; + QVariant data(const QModelIndex &index, int role) const; public slots: void repopulate(); @@ -38,7 +38,7 @@ class DiveTypeSelectionModel : public QStringListModel { public: static DiveTypeSelectionModel *instance(); Qt::ItemFlags flags(const QModelIndex &index) const; - QVariant data(const QModelIndex &index, int role) const override; + QVariant data(const QModelIndex &index, int role) const; public slots: void repopulate(); @@ -49,8 +49,8 @@ class LanguageModel : public QAbstractListModel { Q_OBJECT public: static LanguageModel *instance(); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; private: LanguageModel(QObject *parent = 0); diff --git a/qt-models/ssrfsortfilterproxymodel.h b/qt-models/ssrfsortfilterproxymodel.h index 0fb76d91e..25bcaa310 100644 --- a/qt-models/ssrfsortfilterproxymodel.h +++ b/qt-models/ssrfsortfilterproxymodel.h @@ -17,9 +17,9 @@ class SsrfSortFilterProxyModel : public QSortFilterProxyModel { public: SsrfSortFilterProxyModel(QObject *parent = 0); - bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override; - bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; - bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const override; + bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const; + bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const; + bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const; void setLessThan(less_than_cb func); void setFilterRow(filter_accepts_row_cb func); diff --git a/qt-models/tankinfomodel.h b/qt-models/tankinfomodel.h index 7f79a466b..aa4113ca8 100644 --- a/qt-models/tankinfomodel.h +++ b/qt-models/tankinfomodel.h @@ -18,10 +18,10 @@ public: }; TankInfoModel(); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); const QString &biggerString() const; void clear(); public diff --git a/qt-models/treemodel.h b/qt-models/treemodel.h index eae36c58c..e68ae1c32 100644 --- a/qt-models/treemodel.h +++ b/qt-models/treemodel.h @@ -26,11 +26,11 @@ class TreeModel : public QAbstractItemModel { public: TreeModel(QObject *parent = 0); ~TreeModel(); - QVariant data(const QModelIndex &index, int role) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; - QModelIndex parent(const QModelIndex &child) const override; + QVariant data(const QModelIndex &index, int role) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex &child) const; protected: int columns; diff --git a/qt-models/weightmodel.h b/qt-models/weightmodel.h index 574a40c29..ba1456158 100644 --- a/qt-models/weightmodel.h +++ b/qt-models/weightmodel.h @@ -17,10 +17,10 @@ public: }; explicit WeightModel(QObject *parent = 0); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - Qt::ItemFlags flags(const QModelIndex &index) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); void passInData(const QModelIndex &index, const QVariant &value); void add(); diff --git a/qt-models/weightsysteminfomodel.h b/qt-models/weightsysteminfomodel.h index e94225f8f..3a84075cc 100644 --- a/qt-models/weightsysteminfomodel.h +++ b/qt-models/weightsysteminfomodel.h @@ -16,10 +16,10 @@ public: }; WSInfoModel(); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); const QString &biggerString() const; void clear(); void update(); diff --git a/qt-models/yearlystatisticsmodel.h b/qt-models/yearlystatisticsmodel.h index 77a5ae074..e7c0c15f0 100644 --- a/qt-models/yearlystatisticsmodel.h +++ b/qt-models/yearlystatisticsmodel.h @@ -26,7 +26,7 @@ public: COLUMNS }; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; YearlyStatisticsModel(QObject *parent = 0); void update_yearly_stats(); }; |