aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-09-20 11:38:16 +0200
committerLiang Qi <liang.qi@qt.io>2017-09-20 14:27:41 +0200
commit55a671ea73fbe657f360befa221e2c0c15ed4b0e (patch)
tree475e5734183e93311c40971a40bb9ea60b816978 /src/qml/jsruntime/qv4engine.cpp
parent2aba6e35dc6f1534a764690382ca56b6cf099185 (diff)
parent61716e2bbcc62d7447b4d9e8531ad98737407d12 (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 8ca6b03950..a5fc37b91b 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -142,10 +142,6 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
, m_engineId(engineSerial.fetchAndAddOrdered(1))
, regExpCache(0)
, m_multiplyWrappedQObjects(0)
-#ifndef QT_NO_QML_DEBUGGER
- , m_debugger(0)
- , m_profiler(0)
-#endif
{
memoryManager = new QV4::MemoryManager(this);
@@ -501,12 +497,6 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
ExecutionEngine::~ExecutionEngine()
{
-#ifndef QT_NO_QML_DEBUGGER
- delete m_debugger;
- m_debugger = 0;
- delete m_profiler;
- m_profiler = 0;
-#endif
delete m_multiplyWrappedQObjects;
m_multiplyWrappedQObjects = 0;
delete identifierTable;
@@ -534,13 +524,13 @@ ExecutionEngine::~ExecutionEngine()
void ExecutionEngine::setDebugger(Debugging::Debugger *debugger)
{
Q_ASSERT(!m_debugger);
- m_debugger = debugger;
+ m_debugger.reset(debugger);
}
void ExecutionEngine::setProfiler(Profiling::Profiler *profiler)
{
Q_ASSERT(!m_profiler);
- m_profiler = profiler;
+ m_profiler.reset(profiler);
}
#endif // QT_NO_QML_DEBUGGER
@@ -698,21 +688,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)