diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-20 14:00:19 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-02-28 14:25:27 +0000 |
commit | ced351295b67f0c8ef72802a11d2a0f2381b46e8 (patch) | |
tree | bdd563c8d0f731f3cb949494ee07e87a998aa7e5 /tests/auto/client/client/tst_client.cpp | |
parent | 1fab644753443a525475740fc23172dedaa70d0e (diff) |
Use override when applicable
Applied automatic fixes using clang-tidy's modernize-use-override.
This adds the "override" keyword where it's possible and also removes the
"virtual" keyword when redundant.
Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/client/tst_client.cpp')
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 4eb85818c..1e0fc5675 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -54,35 +54,35 @@ public: create(); } - void focusInEvent(QFocusEvent *) + void focusInEvent(QFocusEvent *) override { ++focusInEventCount; } - void focusOutEvent(QFocusEvent *) + void focusOutEvent(QFocusEvent *) override { ++focusOutEventCount; } - void keyPressEvent(QKeyEvent *event) + void keyPressEvent(QKeyEvent *event) override { ++keyPressEventCount; keyCode = event->nativeScanCode(); } - void keyReleaseEvent(QKeyEvent *event) + void keyReleaseEvent(QKeyEvent *event) override { ++keyReleaseEventCount; keyCode = event->nativeScanCode(); } - void mousePressEvent(QMouseEvent *event) + void mousePressEvent(QMouseEvent *event) override { ++mousePressEventCount; mousePressPos = event->pos(); } - void mouseReleaseEvent(QMouseEvent *) + void mouseReleaseEvent(QMouseEvent *) override { ++mouseReleaseEventCount; } @@ -401,7 +401,7 @@ public: cursorImage.fill(Qt::blue); m_dragIcon = QPixmap::fromImage(cursorImage); } - ~DndWindow(){} + ~DndWindow() override{} QPoint frameOffset() const { return QPoint(frameMargins().left(), frameMargins().top()); } bool dragStarted = false; |