diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-25 17:02:45 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-28 15:09:33 +0000 |
commit | a7c7b26653c76e6c699a7f4e81f7ffec60dde0be (patch) | |
tree | ec36313bc3c204a83391c310915018ede65293f7 /src/plugins/qmltooling | |
parent | ddde056393b13db4bab7cf3fddf2a0aeb1fdb6e7 (diff) |
V4: Make ExecutionEngine's debugger and profiler private
This will allow us to #define them away on -no-qml-debug, saving two
pointers per engine.
Change-Id: I400cffd32cd7f55ff0e68565734b6002b9f901d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/qmltooling')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp index d54bf98068..5b96163b48 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlnativedebugservice.cpp @@ -761,7 +761,7 @@ void QQmlNativeDebugServiceImpl::stateAboutToBeChanged(QQmlDebugService::State s if (state == Enabled) { foreach (NativeDebugger *debugger, m_debuggers) { QV4::ExecutionEngine *engine = debugger->engine(); - if (!engine->debugger) + if (!engine->debugger()) engine->setDebugger(debugger); } } diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp index c87ca47c49..00c5c1ad77 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp @@ -706,7 +706,7 @@ void QV4DebugServiceImpl::engineAboutToBeRemoved(QJSEngine *engine) if (engine){ const QV4::ExecutionEngine *ee = QV8Engine::getV4(engine->handle()); if (ee) { - QV4Debugger *debugger = qobject_cast<QV4Debugger *>(ee->debugger); + QV4Debugger *debugger = qobject_cast<QV4Debugger *>(ee->debugger()); if (debugger) debuggerAgent.removeDebugger(debugger); } @@ -720,7 +720,7 @@ void QV4DebugServiceImpl::stateAboutToBeChanged(State state) if (state == Enabled) { foreach (QV4Debugger *debugger, debuggerAgent.debuggers()) { QV4::ExecutionEngine *ee = debugger->engine(); - if (!ee->debugger) + if (!ee->debugger()) ee->setDebugger(debugger); } } diff --git a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp index c88cf559f7..eee1dd7eae 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp @@ -52,19 +52,19 @@ QV4ProfilerAdapter::QV4ProfilerAdapter(QQmlProfilerService *service, QV4::Execut connect(this, &QQmlAbstractProfilerAdapter::profilingEnabledWhileWaiting, this, &QV4ProfilerAdapter::forwardEnabledWhileWaiting, Qt::DirectConnection); connect(this, &QV4ProfilerAdapter::v4ProfilingEnabled, - engine->profiler, &QV4::Profiling::Profiler::startProfiling); + engine->profiler(), &QV4::Profiling::Profiler::startProfiling); connect(this, &QV4ProfilerAdapter::v4ProfilingEnabledWhileWaiting, - engine->profiler, &QV4::Profiling::Profiler::startProfiling, Qt::DirectConnection); + engine->profiler(), &QV4::Profiling::Profiler::startProfiling, Qt::DirectConnection); connect(this, &QQmlAbstractProfilerAdapter::profilingDisabled, - engine->profiler, &QV4::Profiling::Profiler::stopProfiling); + engine->profiler(), &QV4::Profiling::Profiler::stopProfiling); connect(this, &QQmlAbstractProfilerAdapter::profilingDisabledWhileWaiting, - engine->profiler, &QV4::Profiling::Profiler::stopProfiling, + engine->profiler(), &QV4::Profiling::Profiler::stopProfiling, Qt::DirectConnection); connect(this, &QQmlAbstractProfilerAdapter::dataRequested, - engine->profiler, &QV4::Profiling::Profiler::reportData); + engine->profiler(), &QV4::Profiling::Profiler::reportData); connect(this, &QQmlAbstractProfilerAdapter::referenceTimeKnown, - engine->profiler, &QV4::Profiling::Profiler::setTimer); - connect(engine->profiler, &QV4::Profiling::Profiler::dataReady, + engine->profiler(), &QV4::Profiling::Profiler::setTimer); + connect(engine->profiler(), &QV4::Profiling::Profiler::dataReady, this, &QV4ProfilerAdapter::receiveData); } |