diff options
author | Kjell Rune Skaaraas <kjella79@yahoo.no> | 2011-11-07 15:18:33 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-11-07 15:18:33 (GMT) |
commit | e0383c9b8bd6f4e3d445d69690f84209cad42bb5 (patch) | |
tree | 614425a0382aa718ac4f9b12e73018e012568da7 /src/corelib | |
parent | 16f67b49ae5232d4d0fb19e0333f5e2ef2a65449 (diff) | |
download | Qt-e0383c9b8bd6f4e3d445d69690f84209cad42bb5.zip Qt-e0383c9b8bd6f4e3d445d69690f84209cad42bb5.tar.gz Qt-e0383c9b8bd6f4e3d445d69690f84209cad42bb5.tar.bz2 |
Give better error message when using unsupported lookbehinds in QRegExp
Merge-request: 1456
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib')
-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; |