aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compiler.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-07 22:27:23 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-10 14:16:12 +0000
commit886d463061ba34802bf844133396e3706d6912a4 (patch)
tree066b86b99f71388acb07ef1a4e8fc4bb4331ceb2 /src/qml/compiler/qv4compiler.cpp
parent18d2f78437d28987297148b63b99ceed6313a78a (diff)
Enable unicode regular expressions
Add support for the 'u' flag for regular expressions. Change-Id: I409054eaa9c50183619752d14f2638f5a38c0ea7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
-rw-r--r--src/qml/compiler/qv4compiler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
index 4e902eca65..d7c7563315 100644
--- a/src/qml/compiler/qv4compiler.cpp
+++ b/src/qml/compiler/qv4compiler.cpp
@@ -178,6 +178,8 @@ int QV4::Compiler::JSUnitGenerator::registerRegExp(QQmlJS::AST::RegExpLiteral *r
re.flags |= CompiledData::RegExp::RegExp_IgnoreCase;
if (regexp->flags & QQmlJS::Lexer::RegExp_Multiline)
re.flags |= CompiledData::RegExp::RegExp_Multiline;
+ if (regexp->flags & QQmlJS::Lexer::RegExp_Unicode)
+ re.flags |= CompiledData::RegExp::RegExp_Unicode;
regexps.append(re);
return regexps.size() - 1;