summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/modeldelegates.h
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 /desktop-widgets/modeldelegates.h
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>
Diffstat (limited to 'desktop-widgets/modeldelegates.h')
-rw-r--r--desktop-widgets/modeldelegates.h38
1 files changed, 19 insertions, 19 deletions
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