From 257285553fffdb0d9246b3b0a1072f2092f9c0a2 Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Tue, 25 Aug 2020 01:33:00 +0200 Subject: Use qsizetype in QRegularExpression PCRE2 already uses size_t which we can now make full use of. Change-Id: Icb5efd5c6ef27f2e31a9780bf62f5671ddc603cd Reviewed-by: Thiago Macieira --- .../qregularexpression/tst_qregularexpression.cpp | 152 ++++++++++----------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'tests/auto/corelib/text') diff --git a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp index dbe77be1f5..a986223a87 100644 --- a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp +++ b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp @@ -214,9 +214,9 @@ void consistencyCheck(const QRegularExpressionMatch &match) QVERIFY(match.lastCapturedIndex() == 0); for (int i = 0; i <= match.lastCapturedIndex(); ++i) { - int startPos = match.capturedStart(i); - int endPos = match.capturedEnd(i); - int length = match.capturedLength(i); + qsizetype startPos = match.capturedStart(i); + qsizetype endPos = match.capturedEnd(i); + qsizetype length = match.capturedLength(i); QString captured = match.captured(i); QStringView capturedView = match.capturedView(i); @@ -300,7 +300,7 @@ template("regexp"); QTest::addColumn("subject"); - QTest::addColumn("offset"); + QTest::addColumn("offset"); QTest::addColumn("matchOptions"); QTest::addColumn("match"); Match m; - int offset = 0; + qsizetype offset = 0; m.clear(); m.isValid = true; m.hasMatch = true; m.captured << "string" << "string"; QTest::newRow("match01") << QRegularExpression("(\\bstring\\b)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -647,7 +647,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << "a string" << "a" << "string"; QTest::newRow("match02") << QRegularExpression("(\\w+) (\\w+)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -658,7 +658,7 @@ void tst_QRegularExpression::normalMatch_data() m.namedCaptured["noun"] = "string"; QTest::newRow("match03") << QRegularExpression("(?
\\w+) (?\\w+)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -667,7 +667,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << " string" << QString() << "string"; QTest::newRow("match04") << QRegularExpression("(\\w+)? (\\w+)") << " string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -676,7 +676,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << " string" << QString("") << "string"; QTest::newRow("match05") << QRegularExpression("(\\w*) (\\w+)") << " string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -684,7 +684,7 @@ void tst_QRegularExpression::normalMatch_data() m.isValid = true; m.hasMatch = true; m.captured << "c123def" << "c12" << "3" << "def"; offset = 2; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("match06-offset" + QByteArray::number(i)).constData()) << QRegularExpression("(\\w*)(\\d+)(\\w*)") << QStringLiteral("abc123def").mid(offset - i) @@ -697,7 +697,7 @@ void tst_QRegularExpression::normalMatch_data() m.isValid = true; m.hasMatch = true; m.captured << QString(""); offset = 9; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("match07-offset" + QByteArray::number(i)).constData()) << QRegularExpression("\\w*") << QStringLiteral("abc123def").mid(offset - i) @@ -711,7 +711,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << QString("a string") << QString("a string") << QString(""); QTest::newRow("match08") << QRegularExpression("(.*)(.*)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -720,7 +720,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << QString("a string") << QString("") << QString("a string"); QTest::newRow("match09") << QRegularExpression("(.*?)(.*)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -735,7 +735,7 @@ void tst_QRegularExpression::normalMatch_data() m.namedCaptured["nonexisting3"] = QString(); QTest::newRow("match10") << QRegularExpression("(?
\\w+) (?\\w+)") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -746,7 +746,7 @@ void tst_QRegularExpression::normalMatch_data() m.namedCaptured["nonexisting"] = QString(); QTest::newRow("match11") << QRegularExpression("(?\\d*)") << "abcde" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -758,7 +758,7 @@ void tst_QRegularExpression::normalMatch_data() QTest::newRow("match12") << QRegularExpression("\\Bbcd\\B") << "abcde" - << 1 + << qsizetype(1) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -768,14 +768,14 @@ void tst_QRegularExpression::normalMatch_data() m.isValid = true; QTest::newRow("nomatch01") << QRegularExpression("\\d+") << "a string" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; m.clear(); m.isValid = true; offset = 1; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("nomatch02-offset" + QByteArray::number(i)).constData()) << QRegularExpression("(\\w+) (\\w+)") << QStringLiteral("a string").mid(offset - i) @@ -787,7 +787,7 @@ void tst_QRegularExpression::normalMatch_data() m.clear(); m.isValid = true; offset = 9; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("nomatch03-offset" + QByteArray::number(i)).constData()) << QRegularExpression("\\w+") << QStringLiteral("abc123def").mid(offset - i) @@ -802,7 +802,7 @@ void tst_QRegularExpression::normalMatch_data() m.isValid = true; QTest::newRow("anchoredmatch01") << QRegularExpression("\\d+") << "abc123def" - << 0 + << qsizetype(0) << QRegularExpression::MatchOptions(QRegularExpression::AnchorAtOffsetMatchOption) << m; @@ -813,7 +813,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << "678"; QTest::newRow("negativeoffset01") << QRegularExpression("\\d+") << "abc123def678ghi" - << -6 + << qsizetype(-6) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -822,7 +822,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << "678"; QTest::newRow("negativeoffset02") << QRegularExpression("\\d+") << "abc123def678ghi" - << -8 + << qsizetype(-8) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -831,7 +831,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << "678ghi" << "678" << "ghi"; QTest::newRow("negativeoffset03") << QRegularExpression("(\\d+)(\\w+)") << "abc123def678ghi" - << -8 + << qsizetype(-8) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -839,7 +839,7 @@ void tst_QRegularExpression::normalMatch_data() m.isValid = true; QTest::newRow("negativeoffset04") << QRegularExpression("\\d+") << "abc123def678ghi" - << -3 + << qsizetype(-3) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -848,7 +848,7 @@ void tst_QRegularExpression::normalMatch_data() m.captured << "678"; QTest::newRow("negativeoffset05") << QRegularExpression("^\\d+", QRegularExpression::MultilineOption) << "a\nbc123\ndef\n678gh\ni" - << -10 + << qsizetype(-10) << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; } @@ -858,7 +858,7 @@ void tst_QRegularExpression::normalMatch() { QFETCH(QRegularExpression, regexp); QFETCH(QString, subject); - QFETCH(int, offset); + QFETCH(qsizetype, offset); QFETCH(QRegularExpression::MatchOptions, matchOptions); QFETCH(Match, match); @@ -876,20 +876,20 @@ void tst_QRegularExpression::partialMatch_data() { QTest::addColumn("regexp"); QTest::addColumn("subject"); - QTest::addColumn("offset"); + QTest::addColumn("offset"); QTest::addColumn("matchType"); QTest::addColumn("matchOptions"); QTest::addColumn("match"); Match m; - int offset = 0; + qsizetype offset = 0; m.clear(); m.isValid = true; m.hasPartialMatch = true; m.captured << "str"; QTest::newRow("softmatch01") << QRegularExpression("string") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -899,7 +899,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << " str"; QTest::newRow("softmatch02") << QRegularExpression("\\bstring\\b") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -909,7 +909,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << " str"; QTest::newRow("softmatch03") << QRegularExpression("(\\bstring\\b)") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -919,7 +919,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "8 Dec 19"; QTest::newRow("softmatch04") << QRegularExpression("^(\\d{1,2}) (\\w{3}) (\\d{4})$") << "8 Dec 19" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -929,7 +929,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "8 Dec 1985" << "8" << "Dec" << "1985"; QTest::newRow("softmatch05") << QRegularExpression("^(\\d{1,2}) (\\w{3}) (\\d{4})$") << "8 Dec 1985" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -939,7 +939,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "def"; QTest::newRow("softmatch06") << QRegularExpression("abc\\w+X|def") << "abcdef" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -949,7 +949,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "abcdef"; QTest::newRow("softmatch07") << QRegularExpression("abc\\w+X|defY") << "abcdef" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -958,7 +958,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; m.hasPartialMatch = true; m.captured << "def"; offset = 1; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("softmatch08-offset" + QByteArray::number(i)).constData()) << QRegularExpression("abc\\w+X|defY") << QStringLiteral("abcdef").mid(offset - i) @@ -975,7 +975,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "str"; QTest::newRow("hardmatch01") << QRegularExpression("string") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -985,7 +985,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << " str"; QTest::newRow("hardmatch02") << QRegularExpression("\\bstring\\b") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -995,7 +995,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << " str"; QTest::newRow("hardmatch03") << QRegularExpression("(\\bstring\\b)") << "a str" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1005,7 +1005,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "8 Dec 19"; QTest::newRow("hardmatch04") << QRegularExpression("^(\\d{1,2}) (\\w{3}) (\\d{4})$") << "8 Dec 19" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1015,7 +1015,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "8 Dec 1985"; QTest::newRow("hardmatch05") << QRegularExpression("^(\\d{1,2}) (\\w{3}) (\\d{4})$") << "8 Dec 1985" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1025,7 +1025,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "abcdef"; QTest::newRow("hardmatch06") << QRegularExpression("abc\\w+X|def") << "abcdef" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1035,7 +1035,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "abcdef"; QTest::newRow("hardmatch07") << QRegularExpression("abc\\w+X|defY") << "abcdef" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1044,7 +1044,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; m.hasPartialMatch = true; m.captured << "def"; offset = 1; - for (int i = 0; i <= offset; ++i) { + for (qsizetype i = 0; i <= offset; ++i) { QTest::newRow(("hardmatch08-offset" + QByteArray::number(i)).constData()) << QRegularExpression("abc\\w+X|defY") << QStringLiteral("abcdef").mid(offset - i) @@ -1059,7 +1059,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "ab"; QTest::newRow("hardmatch09") << QRegularExpression("abc|ab") << "ab" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1069,7 +1069,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "abc"; QTest::newRow("hardmatch10") << QRegularExpression("abc(def)?") << "abc" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1079,7 +1079,7 @@ void tst_QRegularExpression::partialMatch_data() m.captured << "abc"; QTest::newRow("hardmatch11") << QRegularExpression("(abc)*") << "abc" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1091,7 +1091,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; QTest::newRow("nomatch01") << QRegularExpression("abc\\w+X|defY") << "123456" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1100,7 +1100,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; QTest::newRow("nomatch02") << QRegularExpression("abc\\w+X|defY") << "123456" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1109,7 +1109,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; QTest::newRow("nomatch03") << QRegularExpression("abc\\w+X|defY") << "ab123" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferCompleteMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1118,7 +1118,7 @@ void tst_QRegularExpression::partialMatch_data() m.isValid = true; QTest::newRow("nomatch04") << QRegularExpression("abc\\w+X|defY") << "ab123" - << 0 + << qsizetype(0) << QRegularExpression::PartialPreferFirstMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << m; @@ -1129,7 +1129,7 @@ void tst_QRegularExpression::partialMatch() { QFETCH(QRegularExpression, regexp); QFETCH(QString, subject); - QFETCH(int, offset); + QFETCH(qsizetype, offset); QFETCH(QRegularExpression::MatchType, matchType); QFETCH(QRegularExpression::MatchOptions, matchOptions); QFETCH(Match, match); @@ -1148,7 +1148,7 @@ void tst_QRegularExpression::globalMatch_data() { QTest::addColumn("regexp"); QTest::addColumn("subject"); - QTest::addColumn("offset"); + QTest::addColumn("offset"); QTest::addColumn("matchType"); QTest::addColumn("matchOptions"); QTest::addColumn >("matchList"); @@ -1167,7 +1167,7 @@ void tst_QRegularExpression::globalMatch_data() matchList << m; QTest::newRow("globalmatch01") << QRegularExpression("\\w+") << "the quick fox" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1183,7 +1183,7 @@ void tst_QRegularExpression::globalMatch_data() matchList << m; QTest::newRow("globalmatch02") << QRegularExpression("(\\w+?)(\\w+)") << "the quick fox" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1201,14 +1201,14 @@ void tst_QRegularExpression::globalMatch_data() matchList << m; QTest::newRow("globalmatch03") << QRegularExpression("\\G(?:\\w\\w\\w)*?AAA") << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; QTest::newRow("globalmatch04") << QRegularExpression("(?:\\w\\w\\w)*?AAA") << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::AnchorAtOffsetMatchOption) << matchList; @@ -1233,7 +1233,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures01") << QRegularExpression("a*b*|c") << "ccaabbd" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1256,7 +1256,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures02") << QRegularExpression(".*") << "the\nquick\nfox" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1281,7 +1281,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures03") << QRegularExpression(".*") << "the\nquick\nfox\n" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1304,7 +1304,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures04") << QRegularExpression("(*CRLF).*") << "the\r\nquick\r\nfox" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1329,7 +1329,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures05") << QRegularExpression("(*CRLF).*") << "the\r\nquick\r\nfox\r\n" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1356,7 +1356,7 @@ void tst_QRegularExpression::globalMatch_data() QTest::newRow("globalmatch_emptycaptures06") << QRegularExpression("(*ANYCRLF).*") << "the\r\nquick\nfox\rjumped" - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1378,7 +1378,7 @@ void tst_QRegularExpression::globalMatch_data() matchList << m; QTest::newRow("globalmatch_emptycaptures07") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*") << QString::fromUtf8("ABC""\xf0\x9d\x85\x9d""DEF""\xf0\x9d\x85\x9e""GHI") - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1396,7 +1396,7 @@ void tst_QRegularExpression::globalMatch_data() matchList << m; QTest::newRow("globalmatch_emptycaptures08") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*") << QString::fromUtf8("ABC""\xc3\x80""\xf0\x9d\x85\x9d""\xc3\x80""DEF""\xc3\x80") - << 0 + << qsizetype(0) << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; @@ -1406,7 +1406,7 @@ void tst_QRegularExpression::globalMatch() { QFETCH(QRegularExpression, regexp); QFETCH(QString, subject); - QFETCH(int, offset); + QFETCH(qsizetype, offset); QFETCH(QRegularExpression::MatchType, matchType); QFETCH(QRegularExpression::MatchOptions, matchOptions); QFETCH(QList, matchList); @@ -2185,9 +2185,9 @@ void tst_QRegularExpression::wildcard_data() { QTest::addColumn("pattern"); QTest::addColumn("string"); - QTest::addColumn("foundIndex"); + QTest::addColumn("foundIndex"); - auto addRow = [](const char *pattern, const char *string, int foundIndex) { + auto addRow = [](const char *pattern, const char *string, qsizetype foundIndex) { QTest::newRow(pattern) << pattern << string << foundIndex; }; @@ -2241,7 +2241,7 @@ void tst_QRegularExpression::wildcard() { QFETCH(QString, pattern); QFETCH(QString, string); - QFETCH(int, foundIndex); + QFETCH(qsizetype, foundIndex); QRegularExpression re(QRegularExpression::wildcardToRegularExpression(pattern)); QRegularExpressionMatch match = re.match(string); -- cgit v1.2.3