diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-17 11:43:38 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-04-20 17:44:13 +0200 |
commit | 7202df3689f98a43462dc6411c4593153d300ccd (patch) | |
tree | 07baedaef03d5c5ddc0c7343eaf75c4d7980db5f /tests/benchmarks/widgets/graphicsview/qgraphicsview | |
parent | 13873c6bc6e9514e4b6d4e11f7100863a439e33c (diff) |
Replace QTime with QElapsedTimer in benchmarks
Various benchmarks were still using the deprecated timing API.
One didn't even *use* the timer it implemented this way.
One was just using start as a short-hand for assigning to currentTime().
Change-Id: If406d0fb606e454fec056f386bcd0aa6726ee96e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/benchmarks/widgets/graphicsview/qgraphicsview')
-rw-r--r-- | tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp | 3 | ||||
-rw-r--r-- | tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp index dfa08b6869..93bdc409dc 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -72,7 +72,6 @@ void ChipTester::runBenchmark() { npaints = 0; timerId = startTimer(0); - stopWatch.start(); eventLoop.exec(); killTimer(timerId); } diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h index d85686c94e..cc4a5cd2be 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -31,7 +31,6 @@ #include <QtWidgets/QGraphicsView> #include <QtCore/QEventLoop> -#include <QtCore/QTime> QT_FORWARD_DECLARE_CLASS(QGraphicsScene) QT_FORWARD_DECLARE_CLASS(QGraphicsView) @@ -67,7 +66,6 @@ private: int npaints; int timerId; QEventLoop eventLoop; - QTime stopWatch; Operation operation; }; |