From 74dc89de3ed45ad217fdb003f663144e71ef01f8 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 22 Jun 2020 16:30:54 +0200 Subject: Use QList instead of QVector in benchmarks tests Task-number: QTBUG-84469 Change-Id: Id61d6036067da0bcd0811b1b97df5f1334007b7e Reviewed-by: Lars Knoll --- tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp | 2 +- tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp | 2 +- tests/benchmarks/gui/text/qtext/main.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/benchmarks/gui') diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp index 82804a0977..055ecff6bf 100644 --- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp @@ -310,7 +310,7 @@ void tst_QPainter::drawLine_data() QTest::addColumn("line"); QTest::addColumn("pen"); - QVector pens; + QList pens; pens << QPen(Qt::black) << QPen(Qt::black, 0, Qt::DashDotLine) << QPen(Qt::black, 4) diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp index fb5b2cdc91..40485e303f 100644 --- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp +++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp @@ -55,7 +55,7 @@ public: uint m_total; uint m_iteration; - QVector iterationTimes; + QList iterationTimes; }; void BenchWidget::paintEvent(QPaintEvent *) diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index 7cd4931ca2..192da24f3f 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -37,7 +37,7 @@ #include #include -Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QList) class tst_QText: public QObject { @@ -319,13 +319,13 @@ void tst_QText::layout() void tst_QText::formattedLayout_data() { QTest::addColumn("text"); - QTest::addColumn >("ranges"); + QTest::addColumn>("ranges"); QTextCharFormat format; format.setForeground(QColor("steelblue")); { - QVector ranges; + QList ranges; QTextLayout::FormatRange formatRange; formatRange.format = format; @@ -336,7 +336,7 @@ void tst_QText::formattedLayout_data() QTest::newRow("short-single") << m_shortLorem << ranges; } { - QVector ranges; + QList ranges; QString text = m_lorem.repeated(100); const int width = 1; @@ -355,7 +355,7 @@ void tst_QText::formattedLayout_data() void tst_QText::formattedLayout() { QFETCH(QString, text); - QFETCH(QVector, ranges); + QFETCH(QList, ranges); QTextLayout layout(text); layout.setFormats(ranges); -- cgit v1.2.3