diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 10:04:16 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-25 10:13:12 +0200 |
commit | d1612610e650ffd7f2fbdef535c431647f57f0ac (patch) | |
tree | 6545a46b6aa7e5f89d7b2abcb959a78fa4c114ed /tests/auto/gui/text | |
parent | 8cd3ec4ee43365425be584a48ff2871bd0090ef8 (diff) |
Use QList instead of QVector in gui tests
Task-number: QTBUG-84469
Change-Id: Ia86f39597de418dde6cd9ae3170ef919bd27416a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui/text')
9 files changed, 88 insertions, 86 deletions
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 1e2bb72ddd..a01805236a 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -148,7 +148,7 @@ static const char *tokenName(QCss::TokenType t) return ""; } -static void debug(const QVector<QCss::Symbol> &symbols, int index = -1) +static void debug(const QList<QCss::Symbol> &symbols, int index = -1) { qDebug() << "all symbols:"; for (int i = 0; i < symbols.count(); ++i) @@ -166,7 +166,7 @@ void tst_QCssParser::scanner() QFile inputFile(input); QVERIFY(inputFile.open(QIODevice::ReadOnly|QIODevice::Text)); - QVector<QCss::Symbol> symbols; + QList<QCss::Symbol> symbols; QCss::Scanner::scan(QCss::Scanner::preprocess(QString::fromUtf8(inputFile.readAll())), &symbols); QVERIFY(symbols.count() > 1); @@ -343,9 +343,9 @@ void tst_QCssParser::expr_data() { QTest::addColumn<bool>("parseSuccess"); QTest::addColumn<QString>("css"); - QTest::addColumn<QVector<QCss::Value> >("expectedValues"); + QTest::addColumn<QList<QCss::Value>>("expectedValues"); - QVector<QCss::Value> values; + QList<QCss::Value> values; QCss::Value val; QCss::Value comma; @@ -368,10 +368,10 @@ void tst_QCssParser::expr() { QFETCH(bool, parseSuccess); QFETCH(QString, css); - QFETCH(QVector<QCss::Value>, expectedValues); + QFETCH(QList<QCss::Value>, expectedValues); QCss::Parser parser(css); - QVector<QCss::Value> values; + QList<QCss::Value> values; QVERIFY(parser.testExpr()); QCOMPARE(parser.parseExpr(&values), parseSuccess); if (parseSuccess) { @@ -983,8 +983,8 @@ void tst_QCssParser::marginValue() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); - QVector<QCss::Declaration> decls = rules.at(0).declarations; + QList<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); + QList<QCss::Declaration> decls = rules.at(0).declarations; QCss::ValueExtractor v(decls); { @@ -1162,7 +1162,7 @@ void tst_QCssParser::styleSelector() QVERIFY(!e.isNull()); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::Declaration> decls = testSelector.declarationsForNode(n); + QList<QCss::Declaration> decls = testSelector.declarationsForNode(n); if (match) { QCOMPARE(decls.count(), 1); @@ -1258,7 +1258,7 @@ void tst_QCssParser::specificitySort() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::Declaration> decls = testSelector.declarationsForNode(n); + QList<QCss::Declaration> decls = testSelector.declarationsForNode(n); QCOMPARE(decls.count(), 2); @@ -1340,9 +1340,9 @@ void tst_QCssParser::rulesForNode() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); + QList<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); - QVector<QCss::Declaration> decls; + QList<QCss::Declaration> decls; for (int i = 0; i < rules.count(); i++) { const QCss::Selector &selector = rules.at(i).selectors.at(0); quint64 negated = 0; @@ -1398,8 +1398,8 @@ void tst_QCssParser::shorthandBackgroundProperty() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); - QVector<QCss::Declaration> decls = rules.at(0).declarations; + QList<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); + QList<QCss::Declaration> decls = rules.at(0).declarations; QCss::ValueExtractor v(decls); QBrush brush; @@ -1477,8 +1477,8 @@ void tst_QCssParser::pseudoElement() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); - QVector<QCss::Declaration> decls; + QList<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); + QList<QCss::Declaration> decls; for (int i = 0; i < rules.count(); i++) { const QCss::Selector& selector = rules.at(i).selectors.at(0); if (pseudoElement.compare(selector.pseudoElement(), Qt::CaseInsensitive) != 0) @@ -1564,8 +1564,8 @@ void tst_QCssParser::gradient() QDomElement e = doc.documentElement().firstChildElement(); QCss::StyleSelector::NodePtr n; n.ptr = &e; - QVector<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); - QVector<QCss::Declaration> decls = rules.at(0).declarations; + QList<QCss::StyleRule> rules = testSelector.styleRulesForNode(n); + QList<QCss::Declaration> decls = rules.at(0).declarations; QCss::ValueExtractor ve(decls); QBrush fg, sfg; QBrush sbg, abg; @@ -1624,7 +1624,7 @@ void tst_QCssParser::extractFontFamily() QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) : *sheet.nameIndex.begin(); - const QVector<QCss::Declaration> decls = rule.declarations; + const QList<QCss::Declaration> decls = rule.declarations; QVERIFY(!decls.isEmpty()); QCss::ValueExtractor extractor(decls); @@ -1681,7 +1681,7 @@ void tst_QCssParser::extractBorder() QCOMPARE(sheet.styleRules.count() + sheet.nameIndex.count(), 1); QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) : *sheet.nameIndex.begin(); - const QVector<QCss::Declaration> decls = rule.declarations; + const QList<QCss::Declaration> decls = rule.declarations; QVERIFY(!decls.isEmpty()); QCss::ValueExtractor extractor(decls); @@ -1711,7 +1711,7 @@ void tst_QCssParser::noTextDecoration() QCOMPARE(sheet.styleRules.count() + sheet.nameIndex.count(), 1); QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) : *sheet.nameIndex.begin(); - const QVector<QCss::Declaration> decls = rule.declarations; + const QList<QCss::Declaration> decls = rule.declarations; QVERIFY(!decls.isEmpty()); QCss::ValueExtractor extractor(decls); @@ -1736,7 +1736,7 @@ void tst_QCssParser::quotedAndUnquotedIdentifiers() QCOMPARE(sheet.styleRules.count() + sheet.nameIndex.count(), 1); QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0) : *sheet.nameIndex.begin(); - const QVector<QCss::Declaration> decls = rule.declarations; + const QList<QCss::Declaration> decls = rule.declarations; QCOMPARE(decls.size(), 2); QCOMPARE(decls.at(0).d->values.first().type, QCss::Value::String); 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<quint32> glyphIndexes; - QVector<QPointF> positions; + QList<quint32> glyphIndexes; + QList<QPointF> positions; QFont font; font.setPointSize(18); @@ -135,8 +135,8 @@ void tst_QGlyphRun::copyConstructor() QGlyphRun glyphs; { - QVector<quint32> glyphIndexes; - QVector<QPointF> positions; + QList<quint32> glyphIndexes; + QList<QPointF> positions; QFont font; font.setPointSize(18); @@ -183,7 +183,7 @@ void tst_QGlyphRun::equalsOperator_data() { QGlyphRun busted(two); - QVector<QPointF> positions = busted.positions(); + QList<QPointF> positions = busted.positions(); positions[2] += QPointF(1, 1); busted.setPositions(positions); @@ -204,7 +204,7 @@ void tst_QGlyphRun::equalsOperator_data() { QGlyphRun busted(two); - QVector<quint32> glyphIndexes = busted.glyphIndexes(); + QList<quint32> 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<quint32>() << 1 << 2 << 3); + glyphs.setGlyphIndexes(QList<quint32>() << 1 << 2 << 3); QVERIFY(!glyphs.isEmpty()); glyphs.clear(); QVERIFY(glyphs.isEmpty()); - QVector<quint32> glyphIndexes = QVector<quint32>() << 1 << 2 << 3; - QVector<QPointF> positions = QVector<QPointF>() << QPointF(0, 0) << QPointF(0, 0) << QPointF(0, 0); + QList<quint32> glyphIndexes = QList<quint32>() << 1 << 2 << 3; + QList<QPointF> positions = QList<QPointF>() << 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<quint32>() << 2 << 2 << 2); - glyphRun.setPositions(QVector<QPointF>() << QPointF(2, 3) << QPointF(20, 3) << QPointF(10, 20)); + glyphRun.setGlyphIndexes(QList<quint32>() << 2 << 2 << 2); + glyphRun.setPositions(QList<QPointF>() << 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<quint32> glyphIndexArray; + QList<quint32> glyphIndexArray; glyphIndexArray << 3 << 2 << 1 << 4; - QVector<QPointF> glyphPositionArray; + QList<QPointF> glyphPositionArray; glyphPositionArray << QPointF(1, 2) << QPointF(3, 4) << QPointF(5, 6) << QPointF(7, 8); QGlyphRun glyphRun; glyphRun.setRawData(glyphIndexArray.constData(), glyphPositionArray.constData(), 4); - QVector<quint32> glyphIndexes = glyphRun.glyphIndexes(); - QVector<QPointF> glyphPositions = glyphRun.positions(); + QList<quint32> glyphIndexes = glyphRun.glyphIndexes(); + QList<QPointF> glyphPositions = glyphRun.positions(); QCOMPARE(glyphIndexes.size(), 4); QCOMPARE(glyphPositions.size(), 4); @@ -384,10 +384,10 @@ void tst_QGlyphRun::setRawDataAndGetAsVector() void tst_QGlyphRun::drawNonExistentGlyphs() { - QVector<quint32> glyphIndexes; + QList<quint32> glyphIndexes; glyphIndexes.append(4); - QVector<QPointF> glyphPositions; + QList<QPointF> glyphPositions; glyphPositions.append(QPointF(0, 0)); QGlyphRun glyphs; @@ -495,17 +495,17 @@ void tst_QGlyphRun::detach() { QGlyphRun glyphs; - glyphs.setGlyphIndexes(QVector<quint32>() << 1 << 2 << 3); + glyphs.setGlyphIndexes(QList<quint32>() << 1 << 2 << 3); QGlyphRun otherGlyphs; otherGlyphs = glyphs; QCOMPARE(otherGlyphs.glyphIndexes(), glyphs.glyphIndexes()); - otherGlyphs.setGlyphIndexes(QVector<quint32>() << 4 << 5 << 6); + otherGlyphs.setGlyphIndexes(QList<quint32>() << 4 << 5 << 6); - QCOMPARE(otherGlyphs.glyphIndexes(), QVector<quint32>() << 4 << 5 << 6); - QCOMPARE(glyphs.glyphIndexes(), QVector<quint32>() << 1 << 2 << 3); + QCOMPARE(otherGlyphs.glyphIndexes(), QList<quint32>() << 4 << 5 << 6); + QCOMPARE(glyphs.glyphIndexes(), QList<quint32>() << 1 << 2 << 3); } void tst_QGlyphRun::drawRightToLeft() @@ -559,8 +559,8 @@ void tst_QGlyphRun::boundingRect() QRawFont rawFont(QRawFont::fromFont(QFont())); QVERIFY(rawFont.isValid()); - QVector<quint32> glyphIndexes = rawFont.glyphIndexesForString(s); - QVector<QPointF> positions = rawFont.advancesForGlyphIndexes(glyphIndexes); + QList<quint32> glyphIndexes = rawFont.glyphIndexesForString(s); + QList<QPointF> positions = rawFont.advancesForGlyphIndexes(glyphIndexes); QCOMPARE(glyphIndexes.size(), s.size()); QCOMPARE(positions.size(), glyphIndexes.size()); diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp index a32fb1d25b..a443688d7e 100644 --- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp @@ -285,8 +285,8 @@ void tst_QRawFont::glyphIndices() QRawFont font(testFont, 10); QVERIFY(font.isValid()); - QVector<quint32> glyphIndices = font.glyphIndexesForString(QLatin1String("Foobar")); - QVector<quint32> expectedGlyphIndices; + QList<quint32> glyphIndices = font.glyphIndexesForString(QLatin1String("Foobar")); + QList<quint32> expectedGlyphIndices; expectedGlyphIndices << 44 << 83 << 83 << 70 << 69 << 86; QCOMPARE(glyphIndices, expectedGlyphIndices); @@ -330,11 +330,11 @@ void tst_QRawFont::advances() QRawFontPrivate *font_d = QRawFontPrivate::get(font); QVERIFY(font_d->fontEngine != 0); - QVector<quint32> glyphIndices; + QList<quint32> glyphIndices; glyphIndices << 44 << 83 << 83 << 70 << 69 << 86; // "Foobar" bool supportsSubPixelPositions = font_d->fontEngine->supportsSubPixelPositions(); - QVector<QPointF> advances = font.advancesForGlyphIndexes(glyphIndices); + QList<QPointF> advances = font.advancesForGlyphIndexes(glyphIndices); bool mayDiffer = font_d->fontEngine->type() == QFontEngine::Freetype && (hintingPreference == QFont::PreferFullHinting @@ -358,7 +358,7 @@ void tst_QRawFont::advances() QVERIFY(qFuzzyIsNull(advances.at(i).y())); } - advances = font.advancesForGlyphIndexes(QVector<quint32>()); + advances = font.advancesForGlyphIndexes(QList<quint32>()); QVERIFY(advances.isEmpty()); int numGlyphs = glyphIndices.size(); @@ -415,7 +415,7 @@ void tst_QRawFont::textLayout() QCOMPARE(rawFont.familyName(), familyName); QCOMPARE(rawFont.pixelSize(), 18.0); - QVector<quint32> expectedGlyphIndices; + QList<quint32> expectedGlyphIndices; expectedGlyphIndices << 44 << 83 << 83 << 70 << 69 << 86; QCOMPARE(glyphs.glyphIndexes(), expectedGlyphIndices); @@ -996,10 +996,10 @@ void tst_QRawFont::kernedAdvances() QRawFont font(testFont, pixelSize); QVERIFY(font.isValid()); - QVector<quint32> glyphIndexes = font.glyphIndexesForString(QStringLiteral("__")); + QList<quint32> glyphIndexes = font.glyphIndexesForString(QStringLiteral("__")); QCOMPARE(glyphIndexes.size(), 2); - QVector<QPointF> advances = font.advancesForGlyphIndexes(glyphIndexes, QRawFont::KernedAdvances); + QList<QPointF> advances = font.advancesForGlyphIndexes(glyphIndexes, QRawFont::KernedAdvances); QCOMPARE(advances.size(), 2); qreal expectedAdvanceWidth = pixelSize * underScoreAW / emSquareSize; diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp index 55fff34a8e..1301ccc9cf 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp +++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp @@ -113,8 +113,10 @@ void tst_QSyntaxHighlighter::cleanup() class TestHighlighter : public QSyntaxHighlighter { public: - inline TestHighlighter(const QVector<QTextLayout::FormatRange> &fmts, QTextDocument *parent) - : QSyntaxHighlighter(parent), formats(fmts), highlighted(false), callCount(0) {} + inline TestHighlighter(const QList<QTextLayout::FormatRange> &fmts, QTextDocument *parent) + : QSyntaxHighlighter(parent), formats(fmts), highlighted(false), callCount(0) + { + } inline TestHighlighter(QObject *parent) : QSyntaxHighlighter(parent) {} inline TestHighlighter(QTextDocument *parent) @@ -131,7 +133,7 @@ public: ++callCount; } - QVector<QTextLayout::FormatRange> formats; + QList<QTextLayout::FormatRange> formats; bool highlighted; int callCount; QString highlightedText; @@ -139,7 +141,7 @@ public: void tst_QSyntaxHighlighter::basic() { - QVector<QTextLayout::FormatRange> formats; + QList<QTextLayout::FormatRange> formats; QTextLayout::FormatRange range; range.start = 0; range.length = 2; @@ -206,7 +208,7 @@ void tst_QSyntaxHighlighter::basicTwo() void tst_QSyntaxHighlighter::removeFormatsOnDelete() { - QVector<QTextLayout::FormatRange> formats; + QList<QTextLayout::FormatRange> formats; QTextLayout::FormatRange range; range.start = 0; range.length = 9; @@ -403,7 +405,7 @@ void tst_QSyntaxHighlighter::highlightToEndOfDocument2() void tst_QSyntaxHighlighter::preservePreeditArea() { - QVector<QTextLayout::FormatRange> formats; + QList<QTextLayout::FormatRange> formats; QTextLayout::FormatRange range; range.start = 0; range.length = 8; @@ -500,7 +502,7 @@ void tst_QSyntaxHighlighter::avoidUnnecessaryDelayedRehighlight() void tst_QSyntaxHighlighter::noContentsChangedDuringHighlight() { - QVector<QTextLayout::FormatRange> formats; + QList<QTextLayout::FormatRange> formats; QTextLayout::FormatRange range; range.start = 0; range.length = 10; diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index dacb7c14ab..17ce507cdf 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -1267,7 +1267,7 @@ void tst_QTextDocument::toHtml_data() CREATE_DOC_AND_CURSOR(); QTextTableFormat fmt; - QVector<QTextLength> widths; + QList<QTextLength> widths; widths.append(QTextLength()); widths.append(QTextLength(QTextLength::PercentageLength, 30)); widths.append(QTextLength(QTextLength::FixedLength, 40)); @@ -1540,7 +1540,7 @@ void tst_QTextDocument::toHtml_data() QTextTable *table = cursor.insertTable(2, 2); table->mergeCells(0, 0, 1, 2); QTextTableFormat fmt = table->format(); - QVector<QTextLength> widths; + QList<QTextLength> widths; widths.append(QTextLength(QTextLength::FixedLength, 20)); widths.append(QTextLength(QTextLength::FixedLength, 40)); fmt.setColumnWidthConstraints(widths); diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp index 8a12057527..67bb628215 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp +++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp @@ -1175,7 +1175,7 @@ void tst_QTextDocumentFragment::copySubTable() QTextDocumentFragment frag; { QTextTableFormat fmt; - QVector<QTextLength> constraints; + QList<QTextLength> constraints; constraints << QTextLength(QTextLength::PercentageLength, 16); constraints << QTextLength(QTextLength::PercentageLength, 28); constraints << QTextLength(QTextLength::PercentageLength, 28); @@ -2744,7 +2744,7 @@ void tst_QTextDocumentFragment::html_columnWidths() QCOMPARE(table->rows(), 2); QTextTableFormat fmt = table->format(); - const QVector<QTextLength> columnWidths = fmt.columnWidthConstraints(); + const QList<QTextLength> columnWidths = fmt.columnWidthConstraints(); QCOMPARE(columnWidths.count(), 2); QCOMPARE(columnWidths.at(0).type(), QTextLength::VariableLength); QCOMPARE(columnWidths.at(1).type(), QTextLength::PercentageLength); diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp index 4e5ef7c555..7548dbb8e4 100644 --- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp +++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp @@ -155,7 +155,7 @@ void tst_QTextFormat::testUnderlinePropertyPrecedence() QCOMPARE(format.fontUnderline(), false); QCOMPARE(format.font().underline(), false); - // do it again, but reverse the ordering (we use a QVector internally, so test a LOT ;) + // do it again, but reverse the ordering (we use a QList internally, so test a LOT ;) // create conflict. Should use the new property format.setProperty(QTextCharFormat::FontUnderline, false); format.setProperty(QTextCharFormat::TextUnderlineStyle, QTextCharFormat::SingleUnderline); @@ -210,7 +210,7 @@ void tst_QTextFormat::resolveFont() fmt.setProperty(QTextFormat::FontItalic, true); QTextCursor(&doc).insertText("Test", fmt); - QVector<QTextFormat> formats = doc.allFormats(); + QList<QTextFormat> formats = doc.allFormats(); QCOMPARE(formats.count(), 3); QCOMPARE(formats.at(2).type(), int(QTextFormat::CharFormat)); diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp index cea1dc6dd3..9a55b16af9 100644 --- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp @@ -117,7 +117,7 @@ static void prepareShapingTest(const QFont &font, const ShapeTable *shape_table) string.append(QChar(*u)); testName.append(" 0x" + QByteArray::number(*u, 16)); } - QVector<ushort> glyphs; + QList<ushort> glyphs; for (const ushort *g = s->glyphs; *g; ++g) glyphs.append(*g); @@ -129,7 +129,7 @@ static void doShapingTests() { QFETCH(QFont, font); QFETCH(QString, string); - QFETCH(QVector<ushort>, glyphs); + QFETCH(QList<ushort>, glyphs); QVERIFY(!string.isEmpty()); @@ -176,7 +176,7 @@ void tst_QTextScriptEngine::devanagari_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -283,7 +283,7 @@ void tst_QTextScriptEngine::bengali_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -521,7 +521,7 @@ void tst_QTextScriptEngine::gurmukhi_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -549,7 +549,7 @@ void tst_QTextScriptEngine::oriya_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -590,7 +590,7 @@ void tst_QTextScriptEngine::tamil_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -667,7 +667,7 @@ void tst_QTextScriptEngine::telugu_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -716,7 +716,7 @@ void tst_QTextScriptEngine::kannada_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -787,7 +787,7 @@ void tst_QTextScriptEngine::malayalam_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -868,7 +868,7 @@ void tst_QTextScriptEngine::sinhala_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -906,7 +906,7 @@ void tst_QTextScriptEngine::khmer_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -950,7 +950,7 @@ void tst_QTextScriptEngine::linearB_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -978,7 +978,7 @@ void tst_QTextScriptEngine::greek_data() { QTest::addColumn<QFont>("font"); QTest::addColumn<QString>("string"); - QTest::addColumn<QVector<ushort> >("glyphs"); + QTest::addColumn<QList<ushort>>("glyphs"); if (!haveTestFonts) QSKIP("Test fonts are not available"); @@ -990,7 +990,7 @@ void tst_QTextScriptEngine::greek_data() QString string; string.append(QChar(uc)); QByteArray testName = f.family().toLatin1() + ": 0x" + QByteArray::number(uc, 16); - QTest::newRow(testName.constData()) << f << string << QVector<ushort>(); + QTest::newRow(testName.constData()) << f << string << QList<ushort>(); } } else QSKIP("couldn't find DejaVu Sans"); @@ -1003,7 +1003,7 @@ void tst_QTextScriptEngine::greek_data() QString string; string.append(QChar(uc)); QByteArray testName = f.family().toLatin1() + ": 0x" + QByteArray::number(uc, 16); - QTest::newRow(testName.constData()) << f << string << QVector<ushort>(); + QTest::newRow(testName.constData()) << f << string << QList<ushort>(); } const ShapeTable shape_table [] = { diff --git a/tests/auto/gui/text/qzip/tst_qzip.cpp b/tests/auto/gui/text/qzip/tst_qzip.cpp index c0bf5fef8e..07672d219d 100644 --- a/tests/auto/gui/text/qzip/tst_qzip.cpp +++ b/tests/auto/gui/text/qzip/tst_qzip.cpp @@ -45,7 +45,7 @@ private slots: void tst_QZip::basicUnpack() { QZipReader zip(QFINDTESTDATA("/testdata/test.zip"), QIODevice::ReadOnly); - QVector<QZipReader::FileInfo> files = zip.fileInfoList(); + QList<QZipReader::FileInfo> files = zip.fileInfoList(); QCOMPARE(files.count(), 2); QZipReader::FileInfo fi = files.at(0); @@ -81,7 +81,7 @@ void tst_QZip::basicUnpack() void tst_QZip::symlinks() { QZipReader zip(QFINDTESTDATA("/testdata/symlink.zip"), QIODevice::ReadOnly); - QVector<QZipReader::FileInfo> files = zip.fileInfoList(); + QList<QZipReader::FileInfo> files = zip.fileInfoList(); QCOMPARE(files.count(), 2); QZipReader::FileInfo fi = files.at(0); @@ -104,7 +104,7 @@ void tst_QZip::symlinks() void tst_QZip::readTest() { QZipReader zip("foobar.zip", QIODevice::ReadOnly); // non existing file. - QVector<QZipReader::FileInfo> files = zip.fileInfoList(); + QList<QZipReader::FileInfo> files = zip.fileInfoList(); QCOMPARE(files.count(), 0); QByteArray b = zip.fileData("foobar"); QCOMPARE(b.size(), 0); @@ -123,7 +123,7 @@ void tst_QZip::createArchive() QBuffer buffer2(&zipFile); QZipReader zip2(&buffer2); - QVector<QZipReader::FileInfo> files = zip2.fileInfoList(); + QList<QZipReader::FileInfo> files = zip2.fileInfoList(); QCOMPARE(files.count(), 1); QZipReader::FileInfo file = files.at(0); QCOMPARE(file.filePath, QString("My Filename")); |