diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-21 21:40:01 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-21 21:40:01 +0200 |
commit | a15c7260cc83707dcdd05d7d9c23317536601fdc (patch) | |
tree | 3f60e05467b1a9f38a692e37a4e44675baf71732 /tests/benchmarks/gui | |
parent | 47eba459905ef884931aa1247c847f7a98a77b28 (diff) | |
parent | e10e5318bc02a48a866b76b6f0b7f268d16af642 (diff) |
Merge remote-tracking branch 'origin/5.15' into 5.15.0
Change-Id: I9d9f9e0955144241fcee6148fc78c4501e2ffcea
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r-- | tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp index c2ce15f720..fb5b2cdc91 100644 --- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp +++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.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. @@ -29,6 +29,7 @@ #include <qtest.h> #include <QtCore/qmath.h> +#include <QtCore/QElapsedTimer> #include <QtWidgets/QWidget> #include "benchmarktests.h" @@ -44,7 +45,7 @@ public: qreal result() const { return m_result; } public: - QTime timer; + QElapsedTimer timer; Benchmark *m_benchmark; @@ -77,7 +78,7 @@ void BenchWidget::paintEvent(QPaintEvent *) ++m_iteration; - uint currentElapsed = timer.isNull() ? 0 : timer.elapsed(); + uint currentElapsed = timer.isValid() ? timer.elapsed() : 0; timer.restart(); m_total += currentElapsed; |