From 02c2c930f0874a8886cb0983606c38cb8b356cd7 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 23 Jul 2020 13:54:47 +0200 Subject: Fix some compiler errors caused by bit-rot in manual tests Two methods that have gone away or been renamed, an enum that now doesn't support being assigned from int. QTime should no longer be used as a timer. Removed a test of deprecated code that's gone away. Task-number: QTBUG-85700 Change-Id: Idc6d59542625d22b9937084411b54b0d8aa87f00 Reviewed-by: Volker Hilsheimer --- tests/manual/qgraphicslayout/flicker/window.cpp | 5 ++--- tests/manual/qgraphicslayout/flicker/window.h | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/manual/qgraphicslayout') diff --git a/tests/manual/qgraphicslayout/flicker/window.cpp b/tests/manual/qgraphicslayout/flicker/window.cpp index 32d12f35ee..f5f4131ab7 100644 --- a/tests/manual/qgraphicslayout/flicker/window.cpp +++ b/tests/manual/qgraphicslayout/flicker/window.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. @@ -41,7 +41,7 @@ void SlowWidget::setGeometry(const QRectF &rect) qDebug() << "currentBenchmarkIteration:" << stats.currentBenchmarkIteration; if (stats.currentBenchmarkIteration == m_window->m_benchmarkIterationsSpinBox->value()) { if (stats.output) - stats.output->setText(tr("DONE. Elapsed: %1, setGeometryCount: %2").arg(stats.time.elapsed()).arg(stats.setGeometryCount)); + stats.output->setText(tr("DONE. Elapsed: %1, setGeometryCount: %2").arg(stats.timer.elapsed()).arg(stats.setGeometryCount)); } else { reiterate = true; } @@ -57,4 +57,3 @@ void SlowWidget::setGeometry(const QRectF &rect) //QTimer::singleShot(0, m_window, SLOT(doAgain())); } } - diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h index b2ebe60af4..cb1ac16016 100644 --- a/tests/manual/qgraphicslayout/flicker/window.h +++ b/tests/manual/qgraphicslayout/flicker/window.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. @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include struct Statistics { @@ -52,7 +52,7 @@ struct Statistics { { } QMap setGeometryTracker; - QTime time; + QElapsedTimer timer; int setGeometryCount; int sleepMsecs; QLabel *output; @@ -227,7 +227,7 @@ private slots: m_stats.setGeometryCount = 0; m_stats.setGeometryTracker.clear(); m_stats.sleepMsecs = m_sleepSpinBox->value(); - m_stats.time.start(); + m_stats.timer.start(); m_stats.currentBenchmarkIteration = 0; m_leaf->setMinimumSize(sz); m_leaf->setMaximumSize(sz); -- cgit v1.2.3