diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 16:30:54 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-25 10:13:31 +0200 |
commit | 74dc89de3ed45ad217fdb003f663144e71ef01f8 (patch) | |
tree | 96e56d9e74848da40cb2e7868e0024fa8212ff89 /tests/benchmarks/gui | |
parent | d1612610e650ffd7f2fbdef535c431647f57f0ac (diff) |
Use QList instead of QVector in benchmarks tests
Task-number: QTBUG-84469
Change-Id: Id61d6036067da0bcd0811b1b97df5f1334007b7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r-- | tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtext/main.cpp | 10 |
3 files changed, 7 insertions, 7 deletions
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<QLine>("line"); QTest::addColumn<QPen>("pen"); - QVector<QPen> pens; + QList<QPen> 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<uint> iterationTimes; + QList<uint> 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 <QBuffer> #include <qtest.h> -Q_DECLARE_METATYPE(QVector<QTextLayout::FormatRange>) +Q_DECLARE_METATYPE(QList<QTextLayout::FormatRange>) class tst_QText: public QObject { @@ -319,13 +319,13 @@ void tst_QText::layout() void tst_QText::formattedLayout_data() { QTest::addColumn<QString>("text"); - QTest::addColumn<QVector<QTextLayout::FormatRange> >("ranges"); + QTest::addColumn<QList<QTextLayout::FormatRange>>("ranges"); QTextCharFormat format; format.setForeground(QColor("steelblue")); { - QVector<QTextLayout::FormatRange> ranges; + QList<QTextLayout::FormatRange> ranges; QTextLayout::FormatRange formatRange; formatRange.format = format; @@ -336,7 +336,7 @@ void tst_QText::formattedLayout_data() QTest::newRow("short-single") << m_shortLorem << ranges; } { - QVector<QTextLayout::FormatRange> ranges; + QList<QTextLayout::FormatRange> 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<QTextLayout::FormatRange>, ranges); + QFETCH(QList<QTextLayout::FormatRange>, ranges); QTextLayout layout(text); layout.setFormats(ranges); |