aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-30 10:42:34 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-02-02 15:59:32 +0100
commita9a9fa0c4737017aa4fc72b467eb45645d0912f0 (patch)
tree4753218705648384e6555be0e2bf3165bfb391d9 /src/qml/debugger
parenteace041161a03a849d3896af65493b7885cecc04 (diff)
parente6d4df156e9aec62054740dc99ab8ba2855eaafc (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qqmlprofiler_p.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h
index 7800b24076..2e87f10302 100644
--- a/src/qml/debugger/qqmlprofiler_p.h
+++ b/src/qml/debugger/qqmlprofiler_p.h
@@ -298,9 +298,10 @@ public:
{
// Use the QV4::Function as ID, as that is common among different instances of the same
// component. QQmlBinding is per instance.
- // Add 1 to the ID, to make it different from the IDs the V4 profiler produces. The +1 makes
- // the pointer point into the middle of the QV4::Function. Thus it still points to valid
- // memory but we cannot accidentally create a duplicate key from another object.
+ // Add 1 to the ID, to make it different from the IDs the V4 and signal handling profilers
+ // produce. The +1 makes the pointer point into the middle of the QV4::Function. Thus it
+ // still points to valid memory but we cannot accidentally create a duplicate key from
+ // another object.
// If there is no function, use a static but valid address: The profiler itself.
quintptr locationId = function ? id(function) + 1 : id(this);
m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
@@ -332,7 +333,12 @@ public:
void startHandlingSignal(QQmlBoundSignalExpression *expression)
{
- quintptr locationId(id(expression));
+ // Use the QV4::Function as ID, as that is common among different instances of the same
+ // component. QQmlBoundSignalExpression is per instance.
+ // Add 2 to the ID, to make it different from the IDs the V4 and binding profilers produce.
+ // The +2 makes the pointer point into the middle of the QV4::Function. Thus it still points
+ // to valid memory but we cannot accidentally create a duplicate key from another object.
+ quintptr locationId(id(expression->function()) + 2);
m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
(1 << RangeStart | 1 << RangeLocation), HandlingSignal,
locationId));
@@ -515,7 +521,12 @@ private:
QQmlProfiler *profiler;
};
+#endif // QT_NO_QML_DEBUGGER
+
QT_END_NAMESPACE
+
+#ifndef QT_NO_QML_DEBUGGER
+
Q_DECLARE_METATYPE(QVector<QQmlProfilerData>)
Q_DECLARE_METATYPE(QQmlProfiler::LocationHash)