diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-08 03:06:04 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-08 03:06:04 (GMT) |
commit | b794652b4cc3b71f7d7b83ee72fb8ab4d588cdba (patch) | |
tree | 56f965a47e881a898b21fbdeed4792d4bad5641d /src/corelib/tools | |
parent | 1e50b6abb78ce92241270474fa5b0cc4e568dc18 (diff) | |
parent | e0383c9b8bd6f4e3d445d69690f84209cad42bb5 (diff) | |
download | Qt-b794652b4cc3b71f7d7b83ee72fb8ab4d588cdba.zip Qt-b794652b4cc3b71f7d7b83ee72fb8ab4d588cdba.tar.gz Qt-b794652b4cc3b71f7d7b83ee72fb8ab4d588cdba.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Give better error message when using unsupported lookbehinds in QRegExp
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index ba1609f..e3a771a 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -66,6 +66,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from, #define RXERR_DISABLED QT_TRANSLATE_NOOP("QRegExp", "disabled feature used") #define RXERR_CHARCLASS QT_TRANSLATE_NOOP("QRegExp", "bad char class syntax") #define RXERR_LOOKAHEAD QT_TRANSLATE_NOOP("QRegExp", "bad lookahead syntax") +#define RXERR_LOOKBEHIND QT_TRANSLATE_NOOP("QRegExp", "lookbehinds not supported, see QTBUG-2371") #define RXERR_REPETITION QT_TRANSLATE_NOOP("QRegExp", "bad repetition syntax") #define RXERR_OCTAL QT_TRANSLATE_NOOP("QRegExp", "invalid octal value") #define RXERR_LEFTDELIM QT_TRANSLATE_NOOP("QRegExp", "missing left delim") @@ -3231,6 +3232,9 @@ int QRegExpEngine::getToken() #endif case ':': return Tok_MagicLeftParen; + case '<': + error(RXERR_LOOKBEHIND); + return Tok_MagicLeftParen; default: error(RXERR_LOOKAHEAD); return Tok_MagicLeftParen; |