summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-09-29 22:13:44 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-29 15:23:25 -0700
commit574065b31430245a66808561b1b95139c4cd19f2 (patch)
tree844736a0bf6969af96953db49d247123ff92f787
parentd7e3d68f368a2febcc17b436e097a97a7c0f8ad3 (diff)
downloadsubsurface-574065b31430245a66808561b1b95139c4cd19f2.tar.gz
Cleanup: reinstate override modifiers
This reverts commit 1c4a859c8d0b37b2e938209fe9c4d99e9758327a, where the override modifiers were removed owing to the noisy "inconsistent override modifiers" which is default-on in clang. This warning was disabled in 77577f717f5aad38ea8c4c41c10c181486c4337f, so we can reinstate the overrides. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/divesitehelpers.h2
-rw-r--r--core/downloadfromdcthread.h2
-rw-r--r--desktop-widgets/btdeviceselectiondialog.h2
-rw-r--r--desktop-widgets/configuredivecomputerdialog.h12
-rw-r--r--desktop-widgets/divelistview.h4
-rw-r--r--desktop-widgets/divepicturewidget.h6
-rw-r--r--desktop-widgets/groupedlineedit.h8
-rw-r--r--desktop-widgets/kmessagewidget.h12
-rw-r--r--desktop-widgets/locationinformation.h8
-rw-r--r--desktop-widgets/modeldelegates.h38
-rw-r--r--desktop-widgets/plugins/facebook/facebook_integration.h12
-rw-r--r--desktop-widgets/preferences/preferences_defaults.h4
-rw-r--r--desktop-widgets/preferences/preferences_georeference.h4
-rw-r--r--desktop-widgets/preferences/preferences_graph.h4
-rw-r--r--desktop-widgets/preferences/preferences_language.h4
-rw-r--r--desktop-widgets/preferences/preferences_network.h4
-rw-r--r--desktop-widgets/preferences/preferences_units.h4
-rw-r--r--desktop-widgets/simplewidgets.h6
-rw-r--r--desktop-widgets/starwidget.h12
-rw-r--r--desktop-widgets/statistics/statisticswidget.h2
-rw-r--r--desktop-widgets/tab-widgets/TabDiveExtraInfo.h4
-rw-r--r--desktop-widgets/tab-widgets/TabDiveInformation.h4
-rw-r--r--desktop-widgets/tab-widgets/TabDivePhotos.h6
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.h4
-rw-r--r--desktop-widgets/tableview.h4
-rw-r--r--desktop-widgets/undocommands.h16
-rw-r--r--profile-widget/divepixmapitem.h2
-rw-r--r--profile-widget/diveprofileitem.h50
-rw-r--r--profile-widget/profilewidget2.h22
-rw-r--r--profile-widget/ruleritem.h2
-rw-r--r--qt-models/cleanertablemodel.h4
-rw-r--r--qt-models/cylindermodel.h10
-rw-r--r--qt-models/divecomputerextradatamodel.h4
-rw-r--r--qt-models/divecomputermodel.h8
-rw-r--r--qt-models/divepicturemodel.h6
-rw-r--r--qt-models/diveplannermodel.h12
-rw-r--r--qt-models/diveplotdatamodel.h8
-rw-r--r--qt-models/divetripmodel.h12
-rw-r--r--qt-models/filtermodels.h2
-rw-r--r--qt-models/maplocationmodel.h6
-rw-r--r--qt-models/messagehandlermodel.h6
-rw-r--r--qt-models/models.h8
-rw-r--r--qt-models/ssrfsortfilterproxymodel.h6
-rw-r--r--qt-models/tankinfomodel.h8
-rw-r--r--qt-models/treemodel.h10
-rw-r--r--qt-models/weightmodel.h8
-rw-r--r--qt-models/weightsysteminfomodel.h8
-rw-r--r--qt-models/yearlystatisticsmodel.h2
48 files changed, 196 insertions, 196 deletions
diff --git a/core/divesitehelpers.h b/core/divesitehelpers.h
index 6016d52e2..9227aa5c2 100644
--- a/core/divesitehelpers.h
+++ b/core/divesitehelpers.h
@@ -10,7 +10,7 @@ Q_OBJECT
public:
static ReverseGeoLookupThread *instance();
void lookup(struct dive_site *ds);
- void run();
+ void run() override;
private:
ReverseGeoLookupThread(QObject *parent = 0);
diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h
index 265fb499e..3e2d7ddc0 100644
--- a/core/downloadfromdcthread.h
+++ b/core/downloadfromdcthread.h
@@ -63,7 +63,7 @@ class DownloadThread : public QThread {
public:
DownloadThread();
- void run();
+ void run() override;
DCDeviceData *data();
QString error;
diff --git a/desktop-widgets/btdeviceselectiondialog.h b/desktop-widgets/btdeviceselectiondialog.h
index a7b2002d7..3e034d73f 100644
--- a/desktop-widgets/btdeviceselectiondialog.h
+++ b/desktop-widgets/btdeviceselectiondialog.h
@@ -39,7 +39,7 @@ public:
bool isActive() const;
QString errorToString() const;
QBluetoothDeviceDiscoveryAgent::Error error() const;
- void run();
+ void run() override;
void stop();
private:
diff --git a/desktop-widgets/configuredivecomputerdialog.h b/desktop-widgets/configuredivecomputerdialog.h
index ba4e3361d..fe617b0ba 100644
--- a/desktop-widgets/configuredivecomputerdialog.h
+++ b/desktop-widgets/configuredivecomputerdialog.h
@@ -26,9 +26,9 @@ public:
GasSpinBoxItemDelegate(QObject *parent = 0, column_type type = PERCENT);
~GasSpinBoxItemDelegate();
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- void setEditorData(QWidget *editor, const QModelIndex &index) const;
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
private:
column_type type;
@@ -46,9 +46,9 @@ public:
GasTypeComboBoxItemDelegate(QObject *parent = 0, computer_type type = OSTC3);
~GasTypeComboBoxItemDelegate();
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- void setEditorData(QWidget *editor, const QModelIndex &index) const;
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
private:
computer_type type;
diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h
index 7e2b6425d..2d7699d1d 100644
--- a/desktop-widgets/divelistview.h
+++ b/desktop-widgets/divelistview.h
@@ -45,8 +45,8 @@ slots:
void removeFromTrip();
void deleteDive();
void markDiveInvalid();
- void rowsInserted(const QModelIndex &parent, int start, int end);
- void reset();
+ void rowsInserted(const QModelIndex &parent, int start, int end) override;
+ void reset() override;
void mergeTripAbove();
void mergeTripBelow();
void newTripAbove();
diff --git a/desktop-widgets/divepicturewidget.h b/desktop-widgets/divepicturewidget.h
index 267bfaeaa..d5457cbc2 100644
--- a/desktop-widgets/divepicturewidget.h
+++ b/desktop-widgets/divepicturewidget.h
@@ -12,9 +12,9 @@ class DivePictureWidget : public QListView {
public:
DivePictureWidget(QWidget *parent);
protected:
- void mouseDoubleClickEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void wheelEvent(QWheelEvent *event);
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void wheelEvent(QWheelEvent *event) override;
signals:
void photoDoubleClicked(const QString filePath);
diff --git a/desktop-widgets/groupedlineedit.h b/desktop-widgets/groupedlineedit.h
index 466912e10..36f1f8b4f 100644
--- a/desktop-widgets/groupedlineedit.h
+++ b/desktop-widgets/groupedlineedit.h
@@ -55,15 +55,15 @@ public:
void addColor(QColor color);
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ QSize sizeHint() const override;
+ QSize minimumSizeHint() const override;
signals:
void editingFinished();
protected:
- void paintEvent(QPaintEvent *e);
- void keyPressEvent(QKeyEvent *e);
+ void paintEvent(QPaintEvent *e) override;
+ void keyPressEvent(QKeyEvent *e) override;
private:
struct Private;
diff --git a/desktop-widgets/kmessagewidget.h b/desktop-widgets/kmessagewidget.h
index 74568789f..61a034280 100644
--- a/desktop-widgets/kmessagewidget.h
+++ b/desktop-widgets/kmessagewidget.h
@@ -186,18 +186,18 @@ public:
/**
* Returns the preferred size of the message widget.
*/
- QSize sizeHint() const;
+ QSize sizeHint() const override;
/**
* Returns the minimum size of the message widget.
*/
- QSize minimumSizeHint() const;
+ QSize minimumSizeHint() const override;
/**
* Returns the required height for @p width.
* @param width the width in pixels
*/
- int heightForWidth(int width) const;
+ int heightForWidth(int width) const override;
/**
* The icon shown on the left of the text. By default, no icon is shown.
@@ -326,11 +326,11 @@ Q_SIGNALS:
void showAnimationFinished();
protected:
- void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event) override;
- bool event(QEvent *event);
+ bool event(QEvent *event) override;
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event) override;
private:
KMessageWidgetPrivate *const d;
diff --git a/desktop-widgets/locationinformation.h b/desktop-widgets/locationinformation.h
index af25a5af2..3b88bd030 100644
--- a/desktop-widgets/locationinformation.h
+++ b/desktop-widgets/locationinformation.h
@@ -11,7 +11,7 @@ class LocationInformationWidget : public QGroupBox {
Q_OBJECT
public:
LocationInformationWidget(QWidget *parent = 0);
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(QObject*, QEvent*) override;
protected:
void showEvent(QShowEvent *);
@@ -56,8 +56,8 @@ class DiveLocationFilterProxyModel : public QSortFilterProxyModel {
Q_OBJECT
public:
DiveLocationFilterProxyModel(QObject *parent = 0);
- bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
- bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const;
+ bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
+ bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override;
};
class DiveLocationModel : public QAbstractTableModel {
@@ -79,7 +79,7 @@ class DiveLocationListView : public QListView {
public:
DiveLocationListView(QWidget *parent = 0);
protected:
- void currentChanged(const QModelIndex& current, const QModelIndex& previous);
+ void currentChanged(const QModelIndex& current, const QModelIndex& previous) override;
signals:
void currentIndexChanged(const QModelIndex& current);
};
diff --git a/desktop-widgets/modeldelegates.h b/desktop-widgets/modeldelegates.h
index 305876352..ae1292030 100644
--- a/desktop-widgets/modeldelegates.h
+++ b/desktop-widgets/modeldelegates.h
@@ -19,8 +19,8 @@ class StarWidgetsDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
explicit StarWidgetsDelegate(QWidget *parent = 0);
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
const QSize& starSize() const;
private:
@@ -32,10 +32,10 @@ class ComboBoxDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
explicit ComboBoxDelegate(QAbstractItemModel *model, QObject *parent = 0, bool allowEdit = true);
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- void setEditorData(QWidget *editor, const QModelIndex &index) const;
- void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- bool eventFilter(QObject *object, QEvent *event);
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
+ void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ bool eventFilter(QObject *object, QEvent *event) override;
public
slots:
void testActivation(const QString &currString = QString());
@@ -54,8 +54,8 @@ class TankInfoDelegate : public ComboBoxDelegate {
Q_OBJECT
public:
explicit TankInfoDelegate(QObject *parent = 0);
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
public
slots:
void revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint);
@@ -66,17 +66,17 @@ class TankUseDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
explicit TankUseDelegate(QObject *parent = 0);
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- void setEditorData(QWidget * editor, const QModelIndex & index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ void setEditorData(QWidget * editor, const QModelIndex & index) const override;
};
class WSInfoDelegate : public ComboBoxDelegate {
Q_OBJECT
public:
explicit WSInfoDelegate(QObject *parent = 0);
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
public
slots:
void revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint);
@@ -86,7 +86,7 @@ class AirTypesDelegate : public ComboBoxDelegate {
Q_OBJECT
public:
explicit AirTypesDelegate(QObject *parent = 0);
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
public
slots:
void revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint);
@@ -96,7 +96,7 @@ class DiveTypesDelegate : public ComboBoxDelegate {
Q_OBJECT
public:
explicit DiveTypesDelegate(QObject *parent = 0);
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
public
slots:
void revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint);
@@ -106,7 +106,7 @@ class SpinBoxDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
SpinBoxDelegate(int min, int max, int step, QObject *parent = 0);
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
int min;
int max;
@@ -117,7 +117,7 @@ class DoubleSpinBoxDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
DoubleSpinBoxDelegate(double min, double max, double step, QObject *parent = 0);
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
double min;
double max;
@@ -128,8 +128,8 @@ class LocationFilterDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
LocationFilterDelegate(QObject *parent = 0);
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
};
#endif // MODELDELEGATES_H
diff --git a/desktop-widgets/plugins/facebook/facebook_integration.h b/desktop-widgets/plugins/facebook/facebook_integration.h
index 1e38ae574..7a9ebc700 100644
--- a/desktop-widgets/plugins/facebook/facebook_integration.h
+++ b/desktop-widgets/plugins/facebook/facebook_integration.h
@@ -13,12 +13,12 @@ class FacebookPlugin : public ISocialNetworkIntegration {
Q_OBJECT
public:
explicit FacebookPlugin(QObject* parent = 0);
- bool isConnected();
- void requestLogin();
- void requestLogoff();
- QString socialNetworkIcon() const;
- QString socialNetworkName() const;
- void requestUpload();
+ bool isConnected() override;
+ void requestLogin() override;
+ void requestLogoff() override;
+ QString socialNetworkIcon() const override;
+ QString socialNetworkName() const override;
+ void requestUpload() override;
private:
FacebookConnectWidget *fbConnectWidget;
};
diff --git a/desktop-widgets/preferences/preferences_defaults.h b/desktop-widgets/preferences/preferences_defaults.h
index 431db4b88..0fa7bdc1b 100644
--- a/desktop-widgets/preferences/preferences_defaults.h
+++ b/desktop-widgets/preferences/preferences_defaults.h
@@ -14,8 +14,8 @@ class PreferencesDefaults : public AbstractPreferencesWidget {
public:
PreferencesDefaults();
~PreferencesDefaults();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
public slots:
void on_chooseFile_clicked();
void on_btnUseDefaultFile_toggled(bool toggled);
diff --git a/desktop-widgets/preferences/preferences_georeference.h b/desktop-widgets/preferences/preferences_georeference.h
index 237281349..a24603bc2 100644
--- a/desktop-widgets/preferences/preferences_georeference.h
+++ b/desktop-widgets/preferences/preferences_georeference.h
@@ -13,8 +13,8 @@ class PreferencesGeoreference : public AbstractPreferencesWidget {
public:
PreferencesGeoreference();
~PreferencesGeoreference();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
private:
Ui::PreferencesGeoreference *ui;
};
diff --git a/desktop-widgets/preferences/preferences_graph.h b/desktop-widgets/preferences/preferences_graph.h
index c63a0372e..4fc9cd5b3 100644
--- a/desktop-widgets/preferences/preferences_graph.h
+++ b/desktop-widgets/preferences/preferences_graph.h
@@ -13,8 +13,8 @@ class PreferencesGraph : public AbstractPreferencesWidget {
public:
PreferencesGraph();
~PreferencesGraph();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
private slots:
void on_gflow_valueChanged(int gf);
diff --git a/desktop-widgets/preferences/preferences_language.h b/desktop-widgets/preferences/preferences_language.h
index 8f3d14d52..a62d4d3dc 100644
--- a/desktop-widgets/preferences/preferences_language.h
+++ b/desktop-widgets/preferences/preferences_language.h
@@ -14,8 +14,8 @@ class PreferencesLanguage : public AbstractPreferencesWidget {
public:
PreferencesLanguage();
~PreferencesLanguage();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
private:
Ui::PreferencesLanguage *ui;
QMap<QString, QString> dateFormatShortMap;
diff --git a/desktop-widgets/preferences/preferences_network.h b/desktop-widgets/preferences/preferences_network.h
index 58a1757cb..f4b2125aa 100644
--- a/desktop-widgets/preferences/preferences_network.h
+++ b/desktop-widgets/preferences/preferences_network.h
@@ -14,8 +14,8 @@ class PreferencesNetwork : public AbstractPreferencesWidget {
public:
PreferencesNetwork();
~PreferencesNetwork();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
public slots:
void proxyType_changed(int i);
diff --git a/desktop-widgets/preferences/preferences_units.h b/desktop-widgets/preferences/preferences_units.h
index bf2bcf043..1f276d178 100644
--- a/desktop-widgets/preferences/preferences_units.h
+++ b/desktop-widgets/preferences/preferences_units.h
@@ -13,8 +13,8 @@ class PreferencesUnits : public AbstractPreferencesWidget {
public:
PreferencesUnits();
~PreferencesUnits();
- void refreshSettings();
- void syncSettings();
+ void refreshSettings() override;
+ void syncSettings() override;
private:
Ui::PreferencesUnits *ui;
};
diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h
index e8c999c40..48e5e7e3d 100644
--- a/desktop-widgets/simplewidgets.h
+++ b/desktop-widgets/simplewidgets.h
@@ -174,8 +174,8 @@ protected:
FilterBase(FilterModelBase *model, QWidget *parent = 0);
FilterModelBase *model;
Ui::FilterWidget ui;
- void showEvent(QShowEvent *);
- void hideEvent(QHideEvent *);
+ void showEvent(QShowEvent *) override;
+ void hideEvent(QHideEvent *) override;
friend class MultiFilter;
};
@@ -208,7 +208,7 @@ class TextHyperlinkEventFilter : public QObject {
public:
explicit TextHyperlinkEventFilter(QTextEdit *txtEdit);
- bool eventFilter(QObject *target, QEvent *evt);
+ bool eventFilter(QObject *target, QEvent *evt) override;
private:
void handleUrlClick(const QString &urlStr);
diff --git a/desktop-widgets/starwidget.h b/desktop-widgets/starwidget.h
index 187cfb0e4..daa4ffbf5 100644
--- a/desktop-widgets/starwidget.h
+++ b/desktop-widgets/starwidget.h
@@ -14,7 +14,7 @@ public:
explicit StarWidget(QWidget *parent = 0, Qt::WindowFlags f = 0);
int currentStars() const;
- QSize sizeHint() const;
+ QSize sizeHint() const override;
static const QImage& starActive();
static const QImage& starInactive();
@@ -28,11 +28,11 @@ slots:
void setReadOnly(bool readOnly);
protected:
- void mouseReleaseEvent(QMouseEvent *);
- void paintEvent(QPaintEvent *);
- void focusInEvent(QFocusEvent *);
- void focusOutEvent(QFocusEvent *);
- void keyPressEvent(QKeyEvent *);
+ void mouseReleaseEvent(QMouseEvent *) override;
+ void paintEvent(QPaintEvent *) override;
+ void focusInEvent(QFocusEvent *) override;
+ void focusOutEvent(QFocusEvent *) override;
+ void keyPressEvent(QKeyEvent *) override;
private:
int current;
diff --git a/desktop-widgets/statistics/statisticswidget.h b/desktop-widgets/statistics/statisticswidget.h
index f12690f9f..4ffd3ff88 100644
--- a/desktop-widgets/statistics/statisticswidget.h
+++ b/desktop-widgets/statistics/statisticswidget.h
@@ -13,7 +13,7 @@ public:
YearlyStatisticsWidget(QWidget *parent = 0);
void setModel(YearlyStatisticsModel *m);
protected:
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event) override;
public slots:
void modelRowsInserted(const QModelIndex& index, int first, int last);
void modelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
diff --git a/desktop-widgets/tab-widgets/TabDiveExtraInfo.h b/desktop-widgets/tab-widgets/TabDiveExtraInfo.h
index 2b0ffc143..86ed7abbe 100644
--- a/desktop-widgets/tab-widgets/TabDiveExtraInfo.h
+++ b/desktop-widgets/tab-widgets/TabDiveExtraInfo.h
@@ -15,8 +15,8 @@ class TabDiveExtraInfo : public TabBase {
public:
TabDiveExtraInfo(QWidget *parent = 0);
~TabDiveExtraInfo();
- void updateData();
- void clear();
+ void updateData() override;
+ void clear() override;
private:
Ui::TabDiveExtraInfo *ui;
ExtraDataModel *extraDataModel;
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.h b/desktop-widgets/tab-widgets/TabDiveInformation.h
index 19c2cf155..80579dbd1 100644
--- a/desktop-widgets/tab-widgets/TabDiveInformation.h
+++ b/desktop-widgets/tab-widgets/TabDiveInformation.h
@@ -13,8 +13,8 @@ class TabDiveInformation : public TabBase {
public:
TabDiveInformation(QWidget *parent = 0);
~TabDiveInformation();
- void updateData();
- void clear();
+ void updateData() override;
+ void clear() override;
private:
Ui::TabDiveInformation *ui;
diff --git a/desktop-widgets/tab-widgets/TabDivePhotos.h b/desktop-widgets/tab-widgets/TabDivePhotos.h
index 5298c7039..f172df180 100644
--- a/desktop-widgets/tab-widgets/TabDivePhotos.h
+++ b/desktop-widgets/tab-widgets/TabDivePhotos.h
@@ -15,11 +15,11 @@ class TabDivePhotos : public TabBase {
public:
TabDivePhotos(QWidget *parent = 0);
~TabDivePhotos();
- void updateData();
- void clear();
+ void updateData() override;
+ void clear() override;
protected:
- void contextMenuEvent(QContextMenuEvent *ev);
+ void contextMenuEvent(QContextMenuEvent *ev) override;
private slots:
void addPhotosFromFile();
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.h b/desktop-widgets/tab-widgets/TabDiveStatistics.h
index 94d2e71b0..c763b2e88 100644
--- a/desktop-widgets/tab-widgets/TabDiveStatistics.h
+++ b/desktop-widgets/tab-widgets/TabDiveStatistics.h
@@ -13,8 +13,8 @@ class TabDiveStatistics : public TabBase {
public:
TabDiveStatistics(QWidget *parent = 0);
~TabDiveStatistics();
- void updateData();
- void clear();
+ void updateData() override;
+ void clear() override;
private:
Ui::TabDiveStatistics *ui;
diff --git a/desktop-widgets/tableview.h b/desktop-widgets/tableview.h
index 6640a114b..5dc5db2b5 100644
--- a/desktop-widgets/tableview.h
+++ b/desktop-widgets/tableview.h
@@ -40,8 +40,8 @@ public:
QTableView *view();
protected:
- void showEvent(QShowEvent *);
- void resizeEvent(QResizeEvent *);
+ void showEvent(QShowEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
signals:
void addButtonClicked();
diff --git a/desktop-widgets/undocommands.h b/desktop-widgets/undocommands.h
index ca7fa7d6f..4e485e5ed 100644
--- a/desktop-widgets/undocommands.h
+++ b/desktop-widgets/undocommands.h
@@ -8,8 +8,8 @@
class UndoDeleteDive : public QUndoCommand {
public:
UndoDeleteDive(QList<struct dive*> deletedDives);
- void undo();
- void redo();
+ void undo() override;
+ void redo() override;
private:
QList<struct dive*> diveList;
@@ -19,8 +19,8 @@ private:
class UndoShiftTime : public QUndoCommand {
public:
UndoShiftTime(QList<int> changedDives, int amount);
- void undo();
- void redo();
+ void undo() override;
+ void redo() override;
private:
QList<int> diveList;
@@ -30,8 +30,8 @@ private:
class UndoRenumberDives : public QUndoCommand {
public:
UndoRenumberDives(QMap<int, QPair<int, int> > originalNumbers);
- void undo();
- void redo();
+ void undo() override;
+ void redo() override;
private:
QMap<int,QPair<int, int> > oldNumbers;
@@ -40,8 +40,8 @@ private:
class UndoRemoveDivesFromTrip : public QUndoCommand {
public:
UndoRemoveDivesFromTrip(QMap<struct dive*, dive_trip*> removedDives);
- void undo();
- void redo();
+ void undo() override;
+ void redo() override;
private:
QMap<struct dive*, dive_trip*> divesToUndo;
diff --git a/profile-widget/divepixmapitem.h b/profile-widget/divepixmapitem.h
index fc4eb1682..cf5b86d7c 100644
--- a/profile-widget/divepixmapitem.h
+++ b/profile-widget/divepixmapitem.h
@@ -20,7 +20,7 @@ class CloseButtonItem : public DivePixmapItem {
public:
CloseButtonItem(QGraphicsItem *parent = 0);
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
public slots:
void hide();
void show();
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index f09c101d1..36f6e5980 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -72,10 +72,10 @@ class DiveProfileItem : public AbstractProfilePolygonItem {
public:
DiveProfileItem();
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
void settingsToggled(bool toggled);
- void settingsChanged();
+ void settingsChanged() override;
void plot_depth_sample(struct plot_data *entry, QFlags<Qt::AlignmentFlag> flags, const QColor &color);
int maxCeiling(int row);
@@ -89,8 +89,8 @@ class DiveMeanDepthItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveMeanDepthItem();
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
void createTextItem();
@@ -102,8 +102,8 @@ class DiveTemperatureItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveTemperatureItem();
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
void createTextItem(int seconds, int mkelvin);
@@ -113,8 +113,8 @@ class DiveHeartrateItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveHeartrateItem();
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
void createTextItem(int seconds, int hr);
@@ -125,8 +125,8 @@ class DivePercentageItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DivePercentageItem(int i);
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QString visibilityKey;
@@ -139,8 +139,8 @@ class DiveAmbPressureItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveAmbPressureItem();
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QString visibilityKey;
@@ -150,8 +150,8 @@ class DiveGFLineItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveGFLineItem();
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QString visibilityKey;
@@ -161,8 +161,8 @@ class DiveGasPressureItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
void plotPressureValue(int mbar, int sec, QFlags<Qt::AlignmentFlag> align, double offset);
@@ -175,9 +175,9 @@ class DiveCalculatedCeiling : public AbstractProfilePolygonItem {
public:
DiveCalculatedCeiling(ProfileWidget2 *profileWidget);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- void settingsChanged();
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
+ void settingsChanged() override;
public
slots:
@@ -195,8 +195,8 @@ class DiveReportedCeiling : public AbstractProfilePolygonItem {
public:
DiveReportedCeiling();
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
};
class DiveCalculatedTissue : public DiveCalculatedCeiling {
@@ -204,15 +204,15 @@ class DiveCalculatedTissue : public DiveCalculatedCeiling {
public:
DiveCalculatedTissue(ProfileWidget2 *profileWidget);
void setVisible(bool visible);
- void settingsChanged();
+ void settingsChanged() override;
};
class PartialPressureGasItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
PartialPressureGasItem();
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
+ void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
void setThresholdSettingsKey(const double *prefPointerMin, const double *prefPointerMax);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index b7cdc8e66..288407381 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -84,7 +84,7 @@ public:
double getFontPrintScale();
void setFontPrintScale(double scale);
#ifndef SUBSURFACE_MOBILE
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(QObject *, QEvent *) override;
void clearHandlers();
#endif
void recalcCeiling();
@@ -146,18 +146,18 @@ slots: // Necessary to call from QAction's signals.
#endif
protected:
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event) override;
#ifndef SUBSURFACE_MOBILE
- void wheelEvent(QWheelEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void contextMenuEvent(QContextMenuEvent *event);
- void mouseDoubleClickEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void contextMenuEvent(QContextMenuEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
#endif
- void dropEvent(QDropEvent *event);
- void dragEnterEvent(QDragEnterEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event) override;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
private: /*methods*/
diff --git a/profile-widget/ruleritem.h b/profile-widget/ruleritem.h
index 1fdb959a2..3a6c59480 100644
--- a/profile-widget/ruleritem.h
+++ b/profile-widget/ruleritem.h
@@ -22,7 +22,7 @@ public:
void recalculate();
protected:
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
private:
struct plot_info pInfo;
struct plot_data *entry;
diff --git a/qt-models/cleanertablemodel.h b/qt-models/cleanertablemodel.h
index fc543f170..d435dad32 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;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
protected:
void setHeaderDataStrings(const QStringList &headers);
diff --git a/qt-models/cylindermodel.h b/qt-models/cylindermodel.h
index 1ec4c05ce..c97eac179 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;
- 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);
+ 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;
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;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
public
slots:
diff --git a/qt-models/divecomputerextradatamodel.h b/qt-models/divecomputerextradatamodel.h
index 562083afc..ab78e4541 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;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
void clear();
void updateDive();
diff --git a/qt-models/divecomputermodel.h b/qt-models/divecomputermodel.h
index 6d92646cf..42e26d442 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;
- 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);
+ 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;
void keepWorkingList();
public
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h
index a1e117c39..6c9384c62 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;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ 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;
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 729b0ca93..3ac5009fe 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;
- 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;
+ 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;
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 fbf32ed84..39074c7ac 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;
- 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;
+ 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;
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 700ae4c12..4164c5788 100644
--- a/qt-models/divetripmodel.h
+++ b/qt-models/divetripmodel.h
@@ -31,10 +31,10 @@ public:
COLUMNS
};
- QVariant data(int column, int role) const;
+ QVariant data(int column, int role) const override;
int diveId;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
- Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
QString displayDate() const;
QString displayDuration() const;
QString displayDepth() const;
@@ -53,7 +53,7 @@ public:
struct TripItem : public TreeItem {
Q_DECLARE_TR_FUNCTIONS(TripItem)
public:
- QVariant data(int column, int role) const;
+ QVariant data(int column, int role) const override;
dive_trip_t *trip;
};
@@ -97,8 +97,8 @@ public:
static DiveTripModel *instance();
Qt::ItemFlags flags(const QModelIndex &index) 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);
+ 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;
DiveTripModel(QObject *parent = 0);
Layout layout() const;
void setLayout(Layout layout);
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h
index 5c54a135b..08e99fd93 100644
--- a/qt-models/filtermodels.h
+++ b/qt-models/filtermodels.h
@@ -105,7 +105,7 @@ class MultiFilterSortModel : public QSortFilterProxyModel {
Q_OBJECT
public:
static MultiFilterSortModel *instance();
- bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
+ bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
void addFilterModel(FilterModelBase *model);
void removeFilterModel(FilterModelBase *model);
bool showDive(const struct dive *d) const;
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index bfda83e90..e198773a5 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;
- int rowCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const override;
+ int rowCount(const QModelIndex &parent) const override;
int count();
void add(MapLocation *);
void addList(QVector<MapLocation *>);
@@ -68,7 +68,7 @@ public:
quint32 selectedUuid();
protected:
- QHash<int, QByteArray> roleNames() const;
+ QHash<int, QByteArray> roleNames() const override;
private:
QVector<MapLocation *> m_mapLocations;
diff --git a/qt-models/messagehandlermodel.h b/qt-models/messagehandlermodel.h
index ae46bf347..3addee95f 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;
- QVariant data(const QModelIndex& idx, int role) const;
- QHash<int, QByteArray> roleNames() const;
+ int rowCount(const QModelIndex& parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex& idx, int role) const override;
+ QHash<int, QByteArray> roleNames() const override;
void addLog(QtMsgType type, const QString& message);
const QString logAsString();
diff --git a/qt-models/models.h b/qt-models/models.h
index 6140e702d..f45c5e614 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;
+ QVariant data(const QModelIndex &index, int role) const override;
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;
+ QVariant data(const QModelIndex &index, int role) const override;
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;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
private:
LanguageModel(QObject *parent = 0);
diff --git a/qt-models/ssrfsortfilterproxymodel.h b/qt-models/ssrfsortfilterproxymodel.h
index 25bcaa310..0fb76d91e 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;
- bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
- bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const;
+ 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;
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 aa4113ca8..7f79a466b 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;
- 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);
+ 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;
const QString &biggerString() const;
void clear();
public
diff --git a/qt-models/treemodel.h b/qt-models/treemodel.h
index 3b2b407e0..44f1e7f35 100644
--- a/qt-models/treemodel.h
+++ b/qt-models/treemodel.h
@@ -26,11 +26,11 @@ class TreeModel : public QAbstractItemModel {
Q_OBJECT
public:
TreeModel(QObject *parent = 0);
- 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;
+ 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;
void clear();
protected:
diff --git a/qt-models/weightmodel.h b/qt-models/weightmodel.h
index ba1456158..574a40c29 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;
- 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);
+ 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;
void passInData(const QModelIndex &index, const QVariant &value);
void add();
diff --git a/qt-models/weightsysteminfomodel.h b/qt-models/weightsysteminfomodel.h
index 3a84075cc..e94225f8f 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;
- 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);
+ 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;
const QString &biggerString() const;
void clear();
void update();
diff --git a/qt-models/yearlystatisticsmodel.h b/qt-models/yearlystatisticsmodel.h
index e7c0c15f0..77a5ae074 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;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
YearlyStatisticsModel(QObject *parent = 0);
void update_yearly_stats();
};