aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/memoryusagemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-09 09:27:07 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-11 15:41:55 +0000
commit86b368f91270fc74ff7152bf51d71961c21bbef4 (patch)
tree07d5c508c1aac4096360ce1401da7807ce382b6c /src/plugins/qmlprofiler/memoryusagemodel.cpp
parent9685711cb399682523d4ef28bcfdc067aebd9fde (diff)
QmlProfiler: Rename all the timeline model data structs to Item
This allows us to define a template for filling a QmlProfilerTimelineModel without spelling out all the type names. Change-Id: I97870287a795d95f58a949729afa715f145817bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/memoryusagemodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/memoryusagemodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp
index a9a09185f54..fa7c258b002 100644
--- a/src/plugins/qmlprofiler/memoryusagemodel.cpp
+++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp
@@ -109,7 +109,7 @@ static int toSameSignedInt(qint64 number)
QVariantMap MemoryUsageModel::details(int index) const
{
QVariantMap result;
- const MemoryAllocationItem *ev = &m_data[index];
+ const Item *ev = &m_data[index];
if (ev->allocated >= -ev->deallocated)
result.insert(QLatin1String("displayName"), tr("Memory Allocated"));
@@ -181,7 +181,7 @@ void MemoryUsageModel::loadEvent(const QmlEvent &event, const QmlEventType &type
m_data[m_currentUsageIndex].update(event.number<qint64>(0));
m_currentUsage = m_data[m_currentUsageIndex].size;
} else {
- MemoryAllocationItem allocation(
+ Item allocation(
m_rangeStack.empty() ? event.typeIndex() :
m_rangeStack.top().originTypeIndex,
m_currentUsage);
@@ -212,7 +212,7 @@ void MemoryUsageModel::loadEvent(const QmlEvent &event, const QmlEventType &type
m_data[m_currentJSHeapIndex].update(event.number<qint64>(0));
m_currentSize = m_data[m_currentJSHeapIndex].size;
} else {
- MemoryAllocationItem allocation(
+ Item allocation(
m_rangeStack.empty() ? event.typeIndex() :
m_rangeStack.top().originTypeIndex,
m_currentSize);
@@ -279,13 +279,13 @@ bool MemoryUsageModel::handlesTypeId(int typeId) const
return false;
}
-MemoryUsageModel::MemoryAllocationItem::MemoryAllocationItem(int typeId, qint64 baseAmount) :
+MemoryUsageModel::Item::Item(int typeId, qint64 baseAmount) :
size(baseAmount), allocated(0), deallocated(0), allocations(0), deallocations(0),
typeId(typeId)
{
}
-void MemoryUsageModel::MemoryAllocationItem::update(qint64 amount)
+void MemoryUsageModel::Item::update(qint64 amount)
{
size += amount;
if (amount < 0) {