From d1612610e650ffd7f2fbdef535c431647f57f0ac Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 23 Jun 2020 10:04:16 +0200 Subject: Use QList instead of QVector in gui tests Task-number: QTBUG-84469 Change-Id: Ia86f39597de418dde6cd9ae3170ef919bd27416a Reviewed-by: Lars Knoll --- tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'tests/auto/gui/text/qglyphrun') diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index cc04d86389..2be683ed13 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -110,8 +110,8 @@ static QGlyphRun make_dummy_indexes() { QGlyphRun glyphs; - QVector glyphIndexes; - QVector positions; + QList glyphIndexes; + QList positions; QFont font; font.setPointSize(18); @@ -135,8 +135,8 @@ void tst_QGlyphRun::copyConstructor() QGlyphRun glyphs; { - QVector glyphIndexes; - QVector positions; + QList glyphIndexes; + QList positions; QFont font; font.setPointSize(18); @@ -183,7 +183,7 @@ void tst_QGlyphRun::equalsOperator_data() { QGlyphRun busted(two); - QVector positions = busted.positions(); + QList positions = busted.positions(); positions[2] += QPointF(1, 1); busted.setPositions(positions); @@ -204,7 +204,7 @@ void tst_QGlyphRun::equalsOperator_data() { QGlyphRun busted(two); - QVector glyphIndexes = busted.glyphIndexes(); + QList glyphIndexes = busted.glyphIndexes(); glyphIndexes[2] += 1; busted.setGlyphIndexes(glyphIndexes); @@ -228,14 +228,14 @@ void tst_QGlyphRun::isEmpty() QGlyphRun glyphs; QVERIFY(glyphs.isEmpty()); - glyphs.setGlyphIndexes(QVector() << 1 << 2 << 3); + glyphs.setGlyphIndexes(QList() << 1 << 2 << 3); QVERIFY(!glyphs.isEmpty()); glyphs.clear(); QVERIFY(glyphs.isEmpty()); - QVector glyphIndexes = QVector() << 1 << 2 << 3; - QVector positions = QVector() << QPointF(0, 0) << QPointF(0, 0) << QPointF(0, 0); + QList glyphIndexes = QList() << 1 << 2 << 3; + QList positions = QList() << QPointF(0, 0) << QPointF(0, 0) << QPointF(0, 0); glyphs.setRawData(glyphIndexes.constData(), positions.constData(), glyphIndexes.size()); QVERIFY(!glyphs.isEmpty()); } @@ -309,8 +309,8 @@ void tst_QGlyphRun::setRawData() { QGlyphRun glyphRun; glyphRun.setRawFont(QRawFont::fromFont(m_testFont)); - glyphRun.setGlyphIndexes(QVector() << 2 << 2 << 2); - glyphRun.setPositions(QVector() << QPointF(2, 3) << QPointF(20, 3) << QPointF(10, 20)); + glyphRun.setGlyphIndexes(QList() << 2 << 2 << 2); + glyphRun.setPositions(QList() << QPointF(2, 3) << QPointF(20, 3) << QPointF(10, 20)); QPixmap baseline(100, 50); baseline.fill(Qt::white); @@ -357,17 +357,17 @@ void tst_QGlyphRun::setRawData() void tst_QGlyphRun::setRawDataAndGetAsVector() { - QVector glyphIndexArray; + QList glyphIndexArray; glyphIndexArray << 3 << 2 << 1 << 4; - QVector glyphPositionArray; + QList glyphPositionArray; glyphPositionArray << QPointF(1, 2) << QPointF(3, 4) << QPointF(5, 6) << QPointF(7, 8); QGlyphRun glyphRun; glyphRun.setRawData(glyphIndexArray.constData(), glyphPositionArray.constData(), 4); - QVector glyphIndexes = glyphRun.glyphIndexes(); - QVector glyphPositions = glyphRun.positions(); + QList glyphIndexes = glyphRun.glyphIndexes(); + QList glyphPositions = glyphRun.positions(); QCOMPARE(glyphIndexes.size(), 4); QCOMPARE(glyphPositions.size(), 4); @@ -384,10 +384,10 @@ void tst_QGlyphRun::setRawDataAndGetAsVector() void tst_QGlyphRun::drawNonExistentGlyphs() { - QVector glyphIndexes; + QList glyphIndexes; glyphIndexes.append(4); - QVector glyphPositions; + QList glyphPositions; glyphPositions.append(QPointF(0, 0)); QGlyphRun glyphs; @@ -495,17 +495,17 @@ void tst_QGlyphRun::detach() { QGlyphRun glyphs; - glyphs.setGlyphIndexes(QVector() << 1 << 2 << 3); + glyphs.setGlyphIndexes(QList() << 1 << 2 << 3); QGlyphRun otherGlyphs; otherGlyphs = glyphs; QCOMPARE(otherGlyphs.glyphIndexes(), glyphs.glyphIndexes()); - otherGlyphs.setGlyphIndexes(QVector() << 4 << 5 << 6); + otherGlyphs.setGlyphIndexes(QList() << 4 << 5 << 6); - QCOMPARE(otherGlyphs.glyphIndexes(), QVector() << 4 << 5 << 6); - QCOMPARE(glyphs.glyphIndexes(), QVector() << 1 << 2 << 3); + QCOMPARE(otherGlyphs.glyphIndexes(), QList() << 4 << 5 << 6); + QCOMPARE(glyphs.glyphIndexes(), QList() << 1 << 2 << 3); } void tst_QGlyphRun::drawRightToLeft() @@ -559,8 +559,8 @@ void tst_QGlyphRun::boundingRect() QRawFont rawFont(QRawFont::fromFont(QFont())); QVERIFY(rawFont.isValid()); - QVector glyphIndexes = rawFont.glyphIndexesForString(s); - QVector positions = rawFont.advancesForGlyphIndexes(glyphIndexes); + QList glyphIndexes = rawFont.glyphIndexesForString(s); + QList positions = rawFont.advancesForGlyphIndexes(glyphIndexes); QCOMPARE(glyphIndexes.size(), s.size()); QCOMPARE(positions.size(), glyphIndexes.size()); -- cgit v1.2.3