forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.1'
Change-Id: Ieaddc6093d10c08a54acb9b57cbbfe022bc3c038
This commit is contained in:
@@ -36,7 +36,7 @@ MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *pa
|
||||
QmlProfilerTimelineModel(manager, MemoryAllocation, MaximumRangeType, ProfileMemory, parent)
|
||||
{
|
||||
// Announce additional features. The base class already announces the main feature.
|
||||
announceFeatures(Constants::QML_JS_RANGE_FEATURES);
|
||||
announceFeatures(Constants::QML_JS_RANGE_FEATURES ^ (1 << ProfileCompiling));
|
||||
}
|
||||
|
||||
int MemoryUsageModel::rowMaxValue(int rowNumber) const
|
||||
@@ -128,7 +128,8 @@ QVariantMap MemoryUsageModel::details(int index) const
|
||||
|
||||
bool MemoryUsageModel::accepted(const QmlEventType &type) const
|
||||
{
|
||||
return QmlProfilerTimelineModel::accepted(type) || type.rangeType() != MaximumRangeType;
|
||||
return QmlProfilerTimelineModel::accepted(type)
|
||||
|| (type.rangeType() != MaximumRangeType && type.rangeType() != Compiling);
|
||||
}
|
||||
|
||||
void MemoryUsageModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
|
||||
@@ -258,6 +259,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)
|
||||
|
||||
Reference in New Issue
Block a user