From b862d429b1010fecf2e29d0e781b012a4b07cad6 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 8 Aug 2018 21:33:18 +0200 Subject: Fix some details in RegExp handling Change-Id: If9f7c07ea657ba8503b9188a7b77e301f23423ef Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexp_p.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/qml/jsruntime/qv4regexp_p.h') diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h index b027ba7659..6afb10ea95 100644 --- a/src/qml/jsruntime/qv4regexp_p.h +++ b/src/qml/jsruntime/qv4regexp_p.h @@ -91,6 +91,13 @@ struct RegExp : Base { return false; #endif } + + bool ignoreCase() const { return flags & CompiledData::RegExp::RegExp_IgnoreCase; } + bool multiLine() const { return flags & CompiledData::RegExp::RegExp_Multiline; } + bool global() const { return flags & CompiledData::RegExp::RegExp_Global; } + bool unicode() const { return flags & CompiledData::RegExp::RegExp_Unicode; } + bool sticky() const { return flags & CompiledData::RegExp::RegExp_Sticky; } + RegExpCache *cache; int subPatternCount; uint flags; @@ -117,11 +124,11 @@ struct RegExp : public Managed #endif RegExpCache *cache() const { return d()->cache; } int subPatternCount() const { return d()->subPatternCount; } - bool ignoreCase() const { return d()->flags & CompiledData::RegExp::RegExp_IgnoreCase; } - bool multiLine() const { return d()->flags & CompiledData::RegExp::RegExp_Multiline; } - bool global() const { return d()->flags & CompiledData::RegExp::RegExp_Global; } - bool unicode() const { return d()->flags & CompiledData::RegExp::RegExp_Unicode; } - bool sticky() const { return d()->flags & CompiledData::RegExp::RegExp_Sticky; } + bool ignoreCase() const { return d()->ignoreCase(); } + bool multiLine() const { return d()->multiLine(); } + bool global() const { return d()->global(); } + bool unicode() const { return d()->unicode(); } + bool sticky() const { return d()->sticky(); } static Heap::RegExp *create(ExecutionEngine* engine, const QString& pattern, uint flags = CompiledData::RegExp::RegExp_NoFlags); -- cgit v1.2.3