From fd80cad07e9ab98ebb8cd1b056aeabc0aed336ea Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 11 May 2014 11:48:47 +0200 Subject: QRegularExpression: allow users to skip the UTF-16 check of the subject string PCRE does not handle invalid UTF-16 sequences. For this reason we always check a subject string's UTF-16 validity before attempting any match over it (actually we let PCRE do that). The only exception so far has been global matching -- once the first match was done, we skipped re-doing the check over and over again the same string (PCRE actually checks the /entire/ string, not only the part it uses for matching). Still, users had no way to skip this check if they were 100% sure the string was a valid UTF-16 string. This commit introduces a way for them to skip the check. Change-Id: Iea352c06f531aa2153863b3a1681acaab7ac375c Reviewed-by: Thiago Macieira --- src/corelib/tools/qregularexpression.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/tools/qregularexpression.h') diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h index bf75d12a05..3352e2b3d5 100644 --- a/src/corelib/tools/qregularexpression.h +++ b/src/corelib/tools/qregularexpression.h @@ -110,7 +110,8 @@ public: enum MatchOption { NoMatchOption = 0x0000, - AnchoredMatchOption = 0x0001 + AnchoredMatchOption = 0x0001, + DontCheckSubjectStringMatchOption = 0x0002 }; Q_DECLARE_FLAGS(MatchOptions, MatchOption) -- cgit v1.2.3