diff options
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qregexp/tst_qregexp.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 4053028..188cdb5 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -1839,7 +1839,7 @@ bool QRegExpMatchState::testAnchor(int i, int a, const int *capBegin) QRegExpMatchState matchState; matchState.prepareForMatch(ahead[j]->eng); matchState.match(in + pos + i, len - pos - i, 0, - true, true, matchState.caretPos - matchState.pos - i); + true, true, caretPos - pos - i); if ((matchState.captured[0] == 0) == ahead[j]->neg) return false; } diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp index d444558..051eb8e 100644 --- a/tests/auto/qregexp/tst_qregexp.cpp +++ b/tests/auto/qregexp/tst_qregexp.cpp @@ -170,12 +170,10 @@ void tst_QRegExp::indexIn_data() << QStringList(); QTest::newRow( stri + "anc09" ) << QString("a(?:(?!)|b)z") << QString("abz") << 0 << 3 << QStringList(); -#if 0 - QTest::newRow( stri + "anc10" ) << QString("a?(?=^b$)") << QString("ab") << 0 << 1 + QTest::newRow( stri + "anc10" ) << QString("a?(?=^b$)") << QString("ab") << -1 << -1 << QStringList(); QTest::newRow( stri + "anc11" ) << QString("a?(?=^b$)") << QString("b") << 0 << 0 << QStringList(); -#endif // back-references QTest::newRow( stri + "bref00" ) << QString("(a*)(\\1)") << QString("aaaaa") << 0 << 4 |