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/kernel/qlayout | |
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/kernel/qlayout')
-rw-r--r-- | tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp index e5e0a48503..dec332196b 100644 --- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp +++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp @@ -104,8 +104,8 @@ public: void setSizeHint(const QSize &s) { sh = s; } - QSize sizeHint() const { return sh; } - QSize minimumSizeHint() const { return msh; } + QSize sizeHint() const override { return sh; } + QSize minimumSizeHint() const override { return msh; } private: QSize sh; @@ -221,13 +221,13 @@ class MyLayout : public QLayout { public: MyLayout() : invalidated(false) {} - virtual void invalidate() {invalidated = true;} + virtual void invalidate() override {invalidated = true;} bool invalidated; - QSize sizeHint() const {return QSize();} - void addItem(QLayoutItem*) {} - QLayoutItem* itemAt(int) const {return 0;} - QLayoutItem* takeAt(int) {return 0;} - int count() const {return 0;} + QSize sizeHint() const override {return QSize();} + void addItem(QLayoutItem*) override {} + QLayoutItem* itemAt(int) const override {return 0;} + QLayoutItem* takeAt(int) override {return 0;} + int count() const override {return 0;} }; void tst_QLayout::setContentsMargins() @@ -253,7 +253,7 @@ void tst_QLayout::setContentsMargins() class EventReceiver : public QObject { public: - bool eventFilter(QObject *watched, QEvent *event) + bool eventFilter(QObject *watched, QEvent *event) override { if (event->type() == QEvent::Show) { geom = static_cast<QWidget*>(watched)->geometry(); |