forked from qt-creator/qt-creator
QmlProfiler: Don't handle type IDs in memory usage model
Events in the memory usage model should not be selected when a type ID is propagated from the statistics or flame graph model. The event in the respective QML/JS model should rather be selected. Change-Id: I6646358650f61c424c607e9dd8edb7fd9a61597e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
@@ -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)
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user