diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp index b0541fa7d00..939e95614e1 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.cpp +++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp @@ -258,6 +258,14 @@ void MemoryUsageModel::clear() QmlProfilerTimelineModel::clear(); } +bool MemoryUsageModel::handlesTypeId(int typeId) const +{ + Q_UNUSED(typeId); + // We don't want the memory ranges allocated by some QML/JS function to be highlighted when + // propagating a typeId selection to the timeline. The actual range should be highlighted. + return false; +} + MemoryUsageModel::MemoryAllocationItem::MemoryAllocationItem(int typeId, qint64 baseAmount) : size(baseAmount), allocated(0), deallocated(0), allocations(0), deallocations(0), typeId(typeId) diff --git a/src/plugins/qmlprofiler/memoryusagemodel.h b/src/plugins/qmlprofiler/memoryusagemodel.h index 948395dfaf5..dd978da788a 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.h +++ b/src/plugins/qmlprofiler/memoryusagemodel.h @@ -71,6 +71,7 @@ public: void loadEvent(const QmlEvent &event, const QmlEventType &type) override; void finalize() override; void clear() override; + bool handlesTypeId(int typeId) const override; private: struct RangeStackFrame {