summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-04-21 01:00:10 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-04-22 15:28:01 +0200
commitefd7757154e1fb946a51c7d90b8cbf56b4df8b6d (patch)
treef757e14770d82ee8376fa10006973c0e750b1e16 /tests/benchmarks/gui
parent1c80d056e4f45b4ee7c4863cd792e83c889513c5 (diff)
parente10e5318bc02a48a866b76b6f0b7f268d16af642 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp7
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;