diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-10 20:39:49 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-11 00:20:47 +0200 |
commit | 6ae7a02104631a2234c475575ae15ca79bef14f9 (patch) | |
tree | 5ca2db0e3aa3c7851c6d19117147c581bebeeee3 /tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp | |
parent | 459e8dfdfb8ac164383c14332b2b0919f59f8b3c (diff) |
Remove most compiler warnings about missing overrides
Remove around 1000 compiler warnings about missing overrides
in our auto tests.
This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.
Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp')
-rw-r--r-- | tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index e9bf14b1e6..3e8a81c33c 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -821,9 +821,9 @@ struct MyPage2 : public QWizardPage public: MyPage2() : init(0), cleanup(0), validate(0) {} - void initializePage() { ++init; QWizardPage::initializePage(); } - void cleanupPage() { ++cleanup; QWizardPage::cleanupPage(); } - bool validatePage() { ++validate; return QWizardPage::validatePage(); } + void initializePage() override { ++init; QWizardPage::initializePage(); } + void cleanupPage() override { ++cleanup; QWizardPage::cleanupPage(); } + bool validatePage() override { ++validate; return QWizardPage::validatePage(); } bool sanityCheck(int init, int cleanup) { @@ -1592,13 +1592,13 @@ protected: class SetPage : public Operation { - void apply(QWizard *wizard) const + void apply(QWizard *wizard) const override { wizard->restart(); for (int j = 0; j < page; ++j) wizard->next(); } - QString describe() const { return QLatin1String("set page ") + QString::number(page); } + QString describe() const override { return QLatin1String("set page ") + QString::number(page); } int page; public: static QSharedPointer<SetPage> create(int page) @@ -1611,8 +1611,8 @@ public: class SetStyle : public Operation { - void apply(QWizard *wizard) const { wizard->setWizardStyle(style); } - QString describe() const { return QLatin1String("set style ") + QString::number(style); } + void apply(QWizard *wizard) const override { wizard->setWizardStyle(style); } + QString describe() const override { return QLatin1String("set style ") + QString::number(style); } QWizard::WizardStyle style; public: static QSharedPointer<SetStyle> create(QWizard::WizardStyle style) @@ -1625,8 +1625,8 @@ public: class SetOption : public Operation { - void apply(QWizard *wizard) const { wizard->setOption(option, on); } - QString describe() const; + void apply(QWizard *wizard) const override { wizard->setOption(option, on); } + QString describe() const override; QWizard::WizardOption option; bool on; public: @@ -2117,8 +2117,8 @@ class WizardPage : public QWizardPage { Q_OBJECT bool shown_; - void showEvent(QShowEvent *) { shown_ = true; } - void hideEvent(QHideEvent *) { shown_ = false; } + void showEvent(QShowEvent *) override { shown_ = true; } + void hideEvent(QHideEvent *) override { shown_ = false; } public: WizardPage() : shown_(false) {} bool shown() const { return shown_; } @@ -2511,7 +2511,7 @@ private: QTreeWidget *treeWidget; QSizePolicy::Policy verticalPolicy; - void initializePage() + void initializePage() override { if (layout()) delete layout(); |