diff options
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 5e776ea09b..a090ac7c47 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -660,21 +660,17 @@ Heap::DateObject *ExecutionEngine::newDateObjectFromTime(const QTime &t) Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QString &pattern, int flags) { bool global = (flags & IR::RegExp::RegExp_Global); - bool ignoreCase = false; - bool multiline = false; - if (flags & IR::RegExp::RegExp_IgnoreCase) - ignoreCase = true; - if (flags & IR::RegExp::RegExp_Multiline) - multiline = true; + bool ignoreCase = (flags & IR::RegExp::RegExp_IgnoreCase); + bool multiline = (flags & IR::RegExp::RegExp_Multiline); Scope scope(this); - Scoped<RegExp> re(scope, RegExp::create(this, pattern, ignoreCase, multiline)); - return newRegExpObject(re, global); + Scoped<RegExp> re(scope, RegExp::create(this, pattern, ignoreCase, multiline, global)); + return newRegExpObject(re); } -Heap::RegExpObject *ExecutionEngine::newRegExpObject(RegExp *re, bool global) +Heap::RegExpObject *ExecutionEngine::newRegExpObject(RegExp *re) { - return memoryManager->allocObject<RegExpObject>(re, global); + return memoryManager->allocObject<RegExpObject>(re); } Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QRegExp &re) |