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/gui/text/qsyntaxhighlighter | |
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/gui/text/qsyntaxhighlighter')
-rw-r--r-- | tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp index 1301ccc9cf..da73e7846a 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp +++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp @@ -45,18 +45,18 @@ public: inline QTestDocumentLayout(QTextDocument *doc) : QAbstractTextDocumentLayout(doc), documentChangedCalled(false) {} - virtual void draw(QPainter *, const QAbstractTextDocumentLayout::PaintContext &) {} + virtual void draw(QPainter *, const QAbstractTextDocumentLayout::PaintContext &) override {} - virtual int hitTest(const QPointF &, Qt::HitTestAccuracy ) const { return 0; } + virtual int hitTest(const QPointF &, Qt::HitTestAccuracy ) const override { return 0; } - virtual void documentChanged(int, int, int) { documentChangedCalled = true; } + virtual void documentChanged(int, int, int) override { documentChangedCalled = true; } - virtual int pageCount() const { return 1; } + virtual int pageCount() const override { return 1; } - virtual QSizeF documentSize() const { return QSize(); } + virtual QSizeF documentSize() const override { return QSize(); } - virtual QRectF frameBoundingRect(QTextFrame *) const { return QRectF(); } - virtual QRectF blockBoundingRect(const QTextBlock &) const { return QRectF(); } + virtual QRectF frameBoundingRect(QTextFrame *) const override { return QRectF(); } + virtual QRectF blockBoundingRect(const QTextBlock &) const override { return QRectF(); } bool documentChangedCalled; }; @@ -122,7 +122,7 @@ public: inline TestHighlighter(QTextDocument *parent) : QSyntaxHighlighter(parent), highlighted(false), callCount(0) {} - virtual void highlightBlock(const QString &text) + virtual void highlightBlock(const QString &text) override { for (int i = 0; i < formats.count(); ++i) { const QTextLayout::FormatRange &range = formats.at(i); @@ -179,7 +179,7 @@ public: highlighted = false; } - virtual void highlightBlock(const QString &text) + virtual void highlightBlock(const QString &text) override { QTextCharFormat commentFormat; commentFormat.setForeground(Qt::darkGreen); @@ -294,7 +294,7 @@ public: state = 0; } - virtual void highlightBlock(const QString &text) + virtual void highlightBlock(const QString &text) override { highlighted = true; if (text == QLatin1String("changestate")) |