diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-11 13:05:27 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 21:03:31 +0200 |
commit | 2c698a6d07c1e8fb1cca417892c017f9591852c3 (patch) | |
tree | 9860cefbcdd1237b85dfabea95ff0060b7b950b6 /tests/auto/widgets/widgets/qspinbox | |
parent | 6a37ca39ec7cfc2f4392784fd31936526d55e941 (diff) |
Fix compiler warnings about missing overrides
Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qspinbox')
-rw-r--r-- | tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index 9f109ab96c..e9c4d3b0d6 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -64,25 +64,25 @@ public: SpinBox(QWidget *parent = 0) : QSpinBox(parent) {} - QString textFromValue(int v) const + QString textFromValue(int v) const override { return QSpinBox::textFromValue(v); } - QValidator::State validate(QString &text, int &pos) const + QValidator::State validate(QString &text, int &pos) const override { return QSpinBox::validate(text, pos); } - int valueFromText(const QString &text) const + int valueFromText(const QString &text) const override { return QSpinBox::valueFromText(text); } #if QT_CONFIG(wheelevent) - void wheelEvent(QWheelEvent *event) + void wheelEvent(QWheelEvent *event) override { QSpinBox::wheelEvent(event); } #endif - void initStyleOption(QStyleOptionSpinBox *option) const + void initStyleOption(QStyleOptionSpinBox *option) const override { QSpinBox::initStyleOption(option); } @@ -510,7 +510,8 @@ class ReadOnlyChangeTracker: public QSpinBox public: ReadOnlyChangeTracker(QWidget *parent = 0) : QSpinBox(parent) {} - void changeEvent(QEvent *ev) { + void changeEvent(QEvent *ev) override + { if (ev->type() == QEvent::ReadOnlyChange) ++readOnlyChangeEventCount; } @@ -1138,7 +1139,7 @@ void tst_QSpinBox::textFromValue() class sizeHint_SpinBox : public QSpinBox { public: - QSize sizeHint() const + QSize sizeHint() const override { ++sizeHintRequests; return QSpinBox::sizeHint(); @@ -1198,7 +1199,7 @@ void tst_QSpinBox::taskQTBUG_5008_textFromValueAndValidate() } //we use the French delimiters here - QString textFromValue (int value) const + QString textFromValue (int value) const override { return locale().toString(value); } |