diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-07 22:27:23 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-10 14:16:12 +0000 |
commit | 886d463061ba34802bf844133396e3706d6912a4 (patch) | |
tree | 066b86b99f71388acb07ef1a4e8fc4bb4331ceb2 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 18d2f78437d28987297148b63b99ceed6313a78a (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/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 8429b96baa..f8caf404e9 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -151,6 +151,7 @@ void RegExpObject::initProperties() setProperty(Index_Global, Primitive::fromBoolean(global())); setProperty(Index_IgnoreCase, Primitive::fromBoolean(value()->ignoreCase)); setProperty(Index_Multiline, Primitive::fromBoolean(value()->multiLine)); + setProperty(Index_Unicode, Primitive::fromBoolean(value()->unicode)); } // Converts a JS RegExp to a QRegExp. @@ -191,6 +192,8 @@ uint RegExpObject::flags() const f |= QV4::RegExpObject::RegExp_IgnoreCase; if (value()->multiLine) f |= QV4::RegExpObject::RegExp_Multiline; + if (value()->unicode) + f |= QV4::RegExpObject::RegExp_Unicode; return f; } |