Commit e5a38bac authored by Ulf Hermann's avatar Ulf Hermann

Move QmlProfiler specific files from qmldebug to qmlprofiler

These file were not used anywhere else and had no business to be in
qmldebug to begin with. Moving them allows us to drop a number of
namespace qualifications and forces us to rename a few local symbols
in other classes in order to avoid name clashes.

Change-Id: I658ed455eec027cbaddacf2980d2ea6827ae6205
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 08655de4
......@@ -5,15 +5,12 @@ contains(CONFIG, dll) {
}
HEADERS += \
$$PWD/qmlprofilereventlocation.h \
$$PWD/qmldebugclient.h \
$$PWD/baseenginedebugclient.h \
$$PWD/declarativeenginedebugclient.h \
$$PWD/declarativeenginedebugclientv2.h \
$$PWD/qmloutputparser.h \
$$PWD/qmldebug_global.h \
$$PWD/qmlprofilereventtypes.h \
$$PWD/qmlprofilertraceclient.h \
$$PWD/qpacketprotocol.h \
$$PWD/qmldebugconstants.h \
$$PWD/qdebugmessageclient.h \
......@@ -28,7 +25,6 @@ SOURCES += \
$$PWD/qmldebugclient.cpp \
$$PWD/baseenginedebugclient.cpp \
$$PWD/qmloutputparser.cpp \
$$PWD/qmlprofilertraceclient.cpp \
$$PWD/qpacketprotocol.cpp \
$$PWD/qdebugmessageclient.cpp \
$$PWD/basetoolsclient.cpp \
......
......@@ -30,10 +30,6 @@ QtcLibrary {
"qmlenginedebugclient.h",
"qmloutputparser.cpp",
"qmloutputparser.h",
"qmlprofilereventlocation.h",
"qmlprofilereventtypes.h",
"qmlprofilertraceclient.cpp",
"qmlprofilertraceclient.h",
"qmltoolsclient.cpp",
"qmltoolsclient.h",
"qpacketprotocol.cpp",
......
......@@ -30,12 +30,12 @@ namespace Internal {
bool DebugMessagesModel::accepted(const QmlProfilerDataModel::QmlEventTypeData &event) const
{
return event.message == QmlDebug::DebugMessage;
return event.message == DebugMessage;
}
DebugMessagesModel::DebugMessagesModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlDebug::DebugMessage, QmlDebug::MaximumRangeType,
QmlDebug::ProfileDebugMessages, parent), m_maximumMsgType(-1)
QmlProfilerTimelineModel(manager, DebugMessage, MaximumRangeType, ProfileDebugMessages, parent),
m_maximumMsgType(-1)
{
}
......
......@@ -53,9 +53,8 @@ FlameGraphModel::FlameGraphModel(QmlProfilerModelManager *modelManager,
// We're iterating twice in loadData.
modelManager->setProxyCountWeight(m_modelId, 2);
m_acceptedTypes << QmlDebug::Compiling << QmlDebug::Creating << QmlDebug::Binding
<< QmlDebug::HandlingSignal << QmlDebug::Javascript;
modelManager->announceFeatures(m_modelId, QmlDebug::Constants::QML_JS_RANGE_FEATURES);
m_acceptedTypes << Compiling << Creating << Binding << HandlingSignal << Javascript;
modelManager->announceFeatures(m_modelId, Constants::QML_JS_RANGE_FEATURES);
}
void FlameGraphModel::clear()
......@@ -84,7 +83,7 @@ void FlameGraphModel::loadNotes(int typeIndex, bool emitSignal)
}
if (emitSignal)
emit dataChanged(QModelIndex(), QModelIndex(), QVector<int>() << Note);
emit dataChanged(QModelIndex(), QModelIndex(), QVector<int>() << NoteRole);
}
void FlameGraphModel::loadData(qint64 rangeStart, qint64 rangeEnd)
......@@ -150,15 +149,15 @@ void FlameGraphModel::loadData(qint64 rangeStart, qint64 rangeEnd)
endResetModel();
}
static QString nameForType(QmlDebug::RangeType typeNumber)
static QString nameForType(RangeType typeNumber)
{
switch (typeNumber) {
case QmlDebug::Painting: return FlameGraphModel::tr("Paint");
case QmlDebug::Compiling: return FlameGraphModel::tr("Compile");
case QmlDebug::Creating: return FlameGraphModel::tr("Create");
case QmlDebug::Binding: return FlameGraphModel::tr("Binding");
case QmlDebug::HandlingSignal: return FlameGraphModel::tr("Signal");
case QmlDebug::Javascript: return FlameGraphModel::tr("JavaScript");
case Painting: return FlameGraphModel::tr("Paint");
case Compiling: return FlameGraphModel::tr("Compile");
case Creating: return FlameGraphModel::tr("Create");
case Binding: return FlameGraphModel::tr("Binding");
case HandlingSignal: return FlameGraphModel::tr("Signal");
case Javascript: return FlameGraphModel::tr("JavaScript");
default: return QString();
}
}
......@@ -166,8 +165,8 @@ static QString nameForType(QmlDebug::RangeType typeNumber)
QVariant FlameGraphModel::lookup(const FlameGraphData &stats, int role) const
{
switch (role) {
case TypeId: return stats.typeIndex;
case Note: {
case TypeIdRole: return stats.typeIndex;
case NoteRole: {
QString ret;
if (!m_typeIdsWithNotes.contains(stats.typeIndex))
return ret;
......@@ -180,10 +179,10 @@ QVariant FlameGraphModel::lookup(const FlameGraphData &stats, int role) const
}
return ret;
}
case Duration: return stats.duration;
case CallCount: return stats.calls;
case TimePerCall: return stats.duration / stats.calls;
case TimeInPercent: return stats.duration * 100 / m_stackBottom.duration;
case DurationRole: return stats.duration;
case CallCountRole: return stats.calls;
case TimePerCallRole: return stats.duration / stats.calls;
case TimeInPercentRole: return stats.duration * 100 / m_stackBottom.duration;
default: break;
}
......@@ -193,14 +192,14 @@ QVariant FlameGraphModel::lookup(const FlameGraphData &stats, int role) const
const QmlProfilerDataModel::QmlEventTypeData &type = typeList[stats.typeIndex];
switch (role) {
case Filename: return type.location.filename;
case Line: return type.location.line;
case Column: return type.location.column;
case Type: return nameForType(type.rangeType);
case RangeType: return type.rangeType;
case Details: return type.data.isEmpty() ?
case FilenameRole: return type.location.filename;
case LineRole: return type.location.line;
case ColumnRole: return type.location.column;
case TypeRole: return nameForType(type.rangeType);
case RangeTypeRole: return type.rangeType;
case DetailsRole: return type.data.isEmpty() ?
FlameGraphModel::tr("Source code not available") : type.data;
case Location: return type.displayName;
case LocationRole: return type.displayName;
default: return QVariant();
}
} else {
......@@ -277,18 +276,18 @@ QVariant FlameGraphModel::data(const QModelIndex &index, int role) const
QHash<int, QByteArray> FlameGraphModel::roleNames() const
{
QHash<int, QByteArray> names = QAbstractItemModel::roleNames();
names[TypeId] = "typeId";
names[Type] = "type";
names[Duration] = "duration";
names[CallCount] = "callCount";
names[Details] = "details";
names[Filename] = "filename";
names[Line] = "line";
names[Column] = "column";
names[Note] = "note";
names[TimePerCall] = "timePerCall";
names[TimeInPercent] = "timeInPercent";
names[RangeType] = "rangeType";
names[TypeIdRole] = "typeId";
names[TypeRole] = "type";
names[DurationRole] = "duration";
names[CallCountRole] = "callCount";
names[DetailsRole] = "details";
names[FilenameRole] = "filename";
names[LineRole] = "line";
names[ColumnRole] = "column";
names[NoteRole] = "note";
names[TimePerCallRole] = "timePerCall";
names[TimeInPercentRole] = "timeInPercent";
names[RangeTypeRole] = "rangeType";
return names;
}
......
......@@ -25,10 +25,10 @@
#pragma once
#include <qmlprofiler/qmlprofilerdatamodel.h>
#include <qmlprofiler/qmlprofilernotesmodel.h>
#include <qmldebug/qmlprofilereventtypes.h>
#include <qmldebug/qmlprofilereventlocation.h>
#include "qmlprofilerdatamodel.h"
#include "qmlprofilernotesmodel.h"
#include "qmlprofilereventtypes.h"
#include "qmlprofilereventlocation.h"
#include <QSet>
#include <QVector>
......@@ -55,19 +55,19 @@ class FlameGraphModel : public QAbstractItemModel
Q_ENUMS(Role)
public:
enum Role {
TypeId = Qt::UserRole + 1, // Sort by data, not by displayed string
Type,
Duration,
CallCount,
Details,
Filename,
Line,
Column,
Note,
TimePerCall,
TimeInPercent,
RangeType,
Location,
TypeIdRole = Qt::UserRole + 1, // Sort by data, not by displayed string
TypeRole,
DurationRole,
CallCountRole,
DetailsRole,
FilenameRole,
LineRole,
ColumnRole,
NoteRole,
TimePerCallRole,
TimeInPercentRole,
RangeTypeRole,
LocationRole,
MaxRole
};
......@@ -100,7 +100,7 @@ private:
int m_modelId;
QmlProfilerModelManager *m_modelManager;
QList<QmlDebug::RangeType> m_acceptedTypes;
QList<RangeType> m_acceptedTypes;
QSet<int> m_typeIdsWithNotes;
};
......
......@@ -91,8 +91,8 @@ void FlameGraphView::selectByTypeId(int typeIndex)
void FlameGraphView::onVisibleFeaturesChanged(quint64 features)
{
int rangeTypeMask = 0;
for (int rangeType = 0; rangeType < QmlDebug::MaximumRangeType; ++rangeType) {
if (features & (1ULL << QmlDebug::featureFromRangeType(QmlDebug::RangeType(rangeType))))
for (int rangeType = 0; rangeType < MaximumRangeType; ++rangeType) {
if (features & (1ULL << featureFromRangeType(RangeType(rangeType))))
rangeTypeMask |= (1 << rangeType);
}
m_content->rootObject()->setProperty("visibleRangeTypes", rangeTypeMask);
......
......@@ -25,7 +25,7 @@
#include "inputeventsmodel.h"
#include "qmlprofilermodelmanager.h"
#include "qmldebug/qmlprofilereventtypes.h"
#include "qmlprofilereventtypes.h"
#include <QKeyEvent>
#include <QMouseEvent>
......@@ -35,15 +35,14 @@ namespace QmlProfiler {
namespace Internal {
InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlDebug::Event, QmlDebug::MaximumRangeType,
QmlDebug::ProfileInputEvents, parent),
QmlProfilerTimelineModel(manager, Event, MaximumRangeType, ProfileInputEvents, parent),
m_keyTypeId(-1), m_mouseTypeId(-1)
{
}
int InputEventsModel::typeId(int index) const
{
return selectionId(index) == QmlDebug::Mouse ? m_mouseTypeId : m_keyTypeId;
return selectionId(index) == Mouse ? m_mouseTypeId : m_keyTypeId;
}
QColor InputEventsModel::color(int index) const
......@@ -57,12 +56,12 @@ QVariantList InputEventsModel::labels() const
QVariantMap element;
element.insert(QLatin1String("description"), QVariant(tr("Mouse Events")));
element.insert(QLatin1String("id"), QVariant(QmlDebug::Mouse));
element.insert(QLatin1String("id"), QVariant(Mouse));
result << element;
element.clear();
element.insert(QLatin1String("description"), QVariant(tr("Keyboard Events")));
element.insert(QLatin1String("id"), QVariant(QmlDebug::Key));
element.insert(QLatin1String("id"), QVariant(Key));
result << element;
return result;
......@@ -80,9 +79,9 @@ QVariantMap InputEventsModel::details(int index) const
QString type;
const InputEvent &event = m_data[index];
switch (event.type) {
case QmlDebug::InputKeyPress:
case InputKeyPress:
type = tr("Key Press");
case QmlDebug::InputKeyRelease:
case InputKeyRelease:
if (type.isEmpty())
type = tr("Key Release");
if (event.a != 0) {
......@@ -93,31 +92,31 @@ QVariantMap InputEventsModel::details(int index) const
QLatin1String(metaEnum("KeyboardModifiers").valueToKeys(event.b)));
}
break;
case QmlDebug::InputMouseDoubleClick:
case InputMouseDoubleClick:
type = tr("Double Click");
case QmlDebug::InputMousePress:
case InputMousePress:
if (type.isEmpty())
type = tr("Mouse Press");
case QmlDebug::InputMouseRelease:
case InputMouseRelease:
if (type.isEmpty())
type = tr("Mouse Release");
result.insert(tr("Button"), QLatin1String(metaEnum("MouseButtons").valueToKey(event.a)));
result.insert(tr("Result"), QLatin1String(metaEnum("MouseButtons").valueToKeys(event.b)));
break;
case QmlDebug::InputMouseMove:
case InputMouseMove:
type = tr("Mouse Move");
result.insert(tr("X"), QString::number(event.a));
result.insert(tr("Y"), QString::number(event.b));
break;
case QmlDebug::InputMouseWheel:
case InputMouseWheel:
type = tr("Mouse Wheel");
result.insert(tr("Angle X"), QString::number(event.a));
result.insert(tr("Angle Y"), QString::number(event.b));
break;
case QmlDebug::InputKeyUnknown:
case InputKeyUnknown:
type = tr("Keyboard Event");
break;
case QmlDebug::InputMouseUnknown:
case InputMouseUnknown:
type = tr("Mouse Event");
break;
default:
......@@ -132,7 +131,7 @@ QVariantMap InputEventsModel::details(int index) const
int InputEventsModel::expandedRow(int index) const
{
return selectionId(index) == QmlDebug::Mouse ? 1 : 2;
return selectionId(index) == Mouse ? 1 : 2;
}
int InputEventsModel::collapsedRow(int index) const
......@@ -154,10 +153,10 @@ void InputEventsModel::loadData()
continue;
m_data.insert(insert(event.startTime(), 0, type.detailType),
InputEvent(static_cast<QmlDebug::InputEventType>(event.numericData(0)),
InputEvent(static_cast<InputEventType>(event.numericData(0)),
event.numericData(1), event.numericData(2)));
if (type.detailType == QmlDebug::Mouse) {
if (type.detailType == Mouse) {
if (m_mouseTypeId == -1)
m_mouseTypeId = event.typeIndex();
} else if (m_keyTypeId == -1) {
......@@ -180,10 +179,10 @@ void InputEventsModel::clear()
bool InputEventsModel::accepted(const QmlProfilerDataModel::QmlEventTypeData &event) const
{
return QmlProfilerTimelineModel::accepted(event) &&
(event.detailType == QmlDebug::Mouse || event.detailType == QmlDebug::Key);
(event.detailType == Mouse || event.detailType == Key);
}
InputEventsModel::InputEvent::InputEvent(QmlDebug::InputEventType type, int a, int b) :
InputEventsModel::InputEvent::InputEvent(InputEventType type, int a, int b) :
type(type), a(a), b(b)
{
}
......
......@@ -39,9 +39,8 @@ protected:
public:
struct InputEvent {
InputEvent(QmlDebug::InputEventType type = QmlDebug::MaximumInputEventType, int a = 0,
int b = 0);
QmlDebug::InputEventType type;
InputEvent(InputEventType type = MaximumInputEventType, int a = 0, int b = 0);
InputEventType type;
int a;
int b;
};
......
......@@ -25,7 +25,7 @@
#include "memoryusagemodel.h"
#include "qmlprofilermodelmanager.h"
#include "qmldebug/qmlprofilereventtypes.h"
#include "qmlprofilereventtypes.h"
#include <QStack>
......@@ -33,11 +33,10 @@ namespace QmlProfiler {
namespace Internal {
MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlDebug::MemoryAllocation, QmlDebug::MaximumRangeType,
QmlDebug::ProfileMemory, parent)
QmlProfilerTimelineModel(manager, MemoryAllocation, MaximumRangeType, ProfileMemory, parent)
{
m_maxSize = 1;
announceFeatures((1ULL << mainFeature()) | QmlDebug::Constants::QML_JS_RANGE_FEATURES);
announceFeatures((1ULL << mainFeature()) | Constants::QML_JS_RANGE_FEATURES);
}
int MemoryUsageModel::rowMaxValue(int rowNumber) const
......@@ -49,7 +48,7 @@ int MemoryUsageModel::rowMaxValue(int rowNumber) const
int MemoryUsageModel::expandedRow(int index) const
{
int type = selectionId(index);
return (type == QmlDebug::HeapPage || type == QmlDebug::LargeItem) ? 1 : 2;
return (type == HeapPage || type == LargeItem) ? 1 : 2;
}
int MemoryUsageModel::collapsedRow(int index) const
......@@ -82,7 +81,7 @@ QVariantMap MemoryUsageModel::location(int index) const
int originType = m_data[index].originTypeIndex;
if (originType > -1) {
const QmlDebug::QmlEventLocation &location =
const QmlEventLocation &location =
modelManager()->qmlModel()->getEventTypes().at(originType).location;
result.insert(file, location.filename);
......@@ -99,12 +98,12 @@ QVariantList MemoryUsageModel::labels() const
QVariantMap element;
element.insert(QLatin1String("description"), QVariant(tr("Memory Allocation")));
element.insert(QLatin1String("id"), QVariant(QmlDebug::HeapPage));
element.insert(QLatin1String("id"), QVariant(HeapPage));
result << element;
element.clear();
element.insert(QLatin1String("description"), QVariant(tr("Memory Usage")));
element.insert(QLatin1String("id"), QVariant(QmlDebug::SmallItem));
element.insert(QLatin1String("id"), QVariant(SmallItem));
result << element;
return result;
......@@ -113,7 +112,7 @@ QVariantList MemoryUsageModel::labels() const
QVariantMap MemoryUsageModel::details(int index) const
{
QVariantMap result;
const MemoryAllocation *ev = &m_data[index];
const MemoryAllocationItem *ev = &m_data[index];
if (ev->allocated >= -ev->deallocated)
result.insert(QLatin1String("displayName"), tr("Memory Allocated"));
......@@ -166,14 +165,14 @@ void MemoryUsageModel::loadData()
while (!rangeStack.empty() && rangeStack.top().endTime < event.startTime())
rangeStack.pop();
if (!accepted(type)) {
if (type.rangeType != QmlDebug::MaximumRangeType) {
if (type.rangeType != MaximumRangeType) {
rangeStack.push(RangeStackFrame(event.typeIndex(), event.startTime(),
event.startTime() + event.duration()));
}
continue;
}
if (type.detailType == QmlDebug::SmallItem || type.detailType == QmlDebug::LargeItem) {
if (type.detailType == SmallItem || type.detailType == LargeItem) {
if (!rangeStack.empty() && currentUsageIndex > -1 &&
type.detailType == selectionId(currentUsageIndex) &&
m_data[currentUsageIndex].originTypeIndex == rangeStack.top().originTypeIndex &&
......@@ -181,7 +180,7 @@ void MemoryUsageModel::loadData()
m_data[currentUsageIndex].update(event.numericData(0));
currentUsage = m_data[currentUsageIndex].size;
} else {
MemoryAllocation allocation(event.typeIndex(), currentUsage,
MemoryAllocationItem allocation(event.typeIndex(), currentUsage,
rangeStack.empty() ? -1 : rangeStack.top().originTypeIndex);
allocation.update(event.numericData(0));
currentUsage = allocation.size;
......@@ -190,12 +189,12 @@ void MemoryUsageModel::loadData()
insertEnd(currentUsageIndex,
event.startTime() - startTime(currentUsageIndex) - 1);
}
currentUsageIndex = insertStart(event.startTime(), QmlDebug::SmallItem);
currentUsageIndex = insertStart(event.startTime(), SmallItem);
m_data.insert(currentUsageIndex, allocation);
}
}
if (type.detailType == QmlDebug::HeapPage || type.detailType == QmlDebug::LargeItem) {
if (type.detailType == HeapPage || type.detailType == LargeItem) {
if (!rangeStack.empty() && currentJSHeapIndex > -1 &&
type.detailType == selectionId(currentJSHeapIndex) &&
m_data[currentJSHeapIndex].originTypeIndex ==
......@@ -204,7 +203,7 @@ void MemoryUsageModel::loadData()
m_data[currentJSHeapIndex].update(event.numericData(0));
currentSize = m_data[currentJSHeapIndex].size;
} else {
MemoryAllocation allocation(event.typeIndex(), currentSize,
MemoryAllocationItem allocation(event.typeIndex(), currentSize,
rangeStack.empty() ? -1 : rangeStack.top().originTypeIndex);
allocation.update(event.numericData(0));
currentSize = allocation.size;
......@@ -246,22 +245,22 @@ void MemoryUsageModel::clear()
QString MemoryUsageModel::memoryTypeName(int type)
{
switch (type) {
case QmlDebug::HeapPage: return tr("Heap Allocation");
case QmlDebug::LargeItem: return tr("Large Item Allocation");
case QmlDebug::SmallItem: return tr("Heap Usage");
case QmlDebug::MaximumMemoryType: return tr("Total");
case HeapPage: return tr("Heap Allocation");
case LargeItem: return tr("Large Item Allocation");
case SmallItem: return tr("Heap Usage");
case MaximumMemoryType: return tr("Total");
default: return tr("Unknown");
}
}
MemoryUsageModel::MemoryAllocation::MemoryAllocation(int type, qint64 baseAmount,
MemoryUsageModel::MemoryAllocationItem::MemoryAllocationItem(int type, qint64 baseAmount,
int originTypeIndex) :
typeId(type), size(baseAmount), allocated(0), deallocated(0), allocations(0), deallocations(0),
originTypeIndex(originTypeIndex)
{
}
void MemoryUsageModel::MemoryAllocation::update(qint64 amount)
void MemoryUsageModel::MemoryAllocationItem::update(qint64 amount)
{
size += amount;
if (amount < 0) {
......
......@@ -39,7 +39,7 @@ class MemoryUsageModel : public QmlProfilerTimelineModel
Q_OBJECT
public:
struct MemoryAllocation {
struct MemoryAllocationItem {
int typeId;
qint64 size;
qint64 allocated;
......@@ -48,7 +48,7 @@ public:
int deallocations;
int originTypeIndex;
MemoryAllocation(int typeId = -1, qint64 baseAmount = 0, int originTypeIndex = -1);
MemoryAllocationItem(int typeId = -1, qint64 baseAmount = 0, int originTypeIndex = -1);
void update(qint64 amount);
};
......@@ -74,7 +74,7 @@ protected:
private:
static QString memoryTypeName(int type);
QVector<MemoryAllocation> m_data;
QVector<MemoryAllocationItem> m_data;
qint64 m_maxSize;
};
......
......@@ -25,14 +25,14 @@
#include "pixmapcachemodel.h"
#include "qmlprofilermodelmanager.h"
#include "qmldebug/qmlprofilereventtypes.h"
#include "qmlprofilereventtypes.h"
namespace QmlProfiler {
namespace Internal {
PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlDebug::PixmapCacheEvent, QmlDebug::MaximumRangeType,
QmlDebug::ProfilePixmapCache, parent)
QmlProfilerTimelineModel(manager, PixmapCacheEvent, MaximumRangeType, ProfilePixmapCache,
parent)
{
m_maxCacheSize = 1;
}
......@@ -113,7 +113,7 @@ QVariantList PixmapCacheModel::labels() const
QVariantMap PixmapCacheModel::details(int index) const
{
QVariantMap result;
const PixmapCacheEvent *ev = &m_data[index];
const PixmapCacheItem *ev = &m_data[index];
if (ev->pixmapEventType == PixmapCacheCountChanged) {
result.insert(QLatin1String("displayName"), tr("Image Cached"));
......@@ -180,7 +180,7 @@ void PixmapCacheModel::loadData()
if (!accepted(type))
continue;
PixmapCacheEvent newEvent;
PixmapCacheItem newEvent;
newEvent.pixmapEventType = static_cast<PixmapEventType>(type.detailType);
qint64 pixmapStartTime = event.startTime();
......@@ -425,7 +425,7 @@ void PixmapCacheModel::clear()
void PixmapCacheModel::computeMaxCacheSize()
{
m_maxCacheSize = 1;
foreach (const PixmapCacheModel::PixmapCacheEvent &event, m_data) {
foreach (const PixmapCacheModel::PixmapCacheItem &event, m_data) {
if (event.pixmapEventType == PixmapCacheModel::PixmapCacheCountChanged) {
if (event.cacheSize > m_maxCacheSize)
m_maxCacheSize = event.cacheSize;
......@@ -451,7 +451,7 @@ void PixmapCacheModel::flattenLoads()
// computes "compressed row"
QVector <qint64> eventEndTimes;
for (int i = 0; i < count(); i++) {
PixmapCacheModel::PixmapCacheEvent &event = m_data[i];
PixmapCacheModel::PixmapCacheItem &event = m_data[i];
if (event.pixmapEventType == PixmapCacheModel::PixmapLoadingStarted) {
event.rowNumberCollapsed = 0;
while (eventEndTimes.count() > event.rowNumberCollapsed &&
......@@ -475,7 +475,7 @@ void PixmapCacheModel::flattenLoads()
}
int PixmapCacheModel::updateCacheCount(int lastCacheSizeEvent,
qint64 pixmapStartTime, qint64 pixSize, PixmapCacheEvent &newEvent, int typeId)
qint64 pixmapStartTime, qint64 pixSize, PixmapCacheItem &newEvent, int typeId)
{
newEvent.pixmapEventType = PixmapCacheCountChanged;