summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/pixmapcachemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-03-28 08:57:46 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-04-17 12:17:23 +0000
commit7ca958fa85a9855ae658eaa3fa38e60b1279fb04 (patch)
tree3b452af3c71f209e5b7dede76c067a1e87cef926 /src/plugins/qmlprofiler/pixmapcachemodel.cpp
parent507c2d6b5b36fae467f7a1d71ac80c9086a5f55b (diff)
downloadqt-creator-7ca958fa85a9855ae658eaa3fa38e60b1279fb04.tar.gz
QmlProfiler: Integrate TraceTime into ModelManager
We never use it independently and only a subset of its interface needs to be public. Change-Id: I97bbc638270bcbb8fb1a4097fcfeacf37e96c048 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/pixmapcachemodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/pixmapcachemodel.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
index df30349b63..1e47dbe420 100644
--- a/src/plugins/qmlprofiler/pixmapcachemodel.cpp
+++ b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
@@ -331,7 +331,7 @@ void PixmapCacheModel::loadEvent(const QmlEvent &event, const QmlEventType &type
if (state.loadState == Initial) {
newEvent.pixmapEventType = PixmapLoadingStarted;
newEvent.typeId = event.typeIndex();
- qint64 traceStart = modelManager()->traceTime()->startTime();
+ const qint64 traceStart = modelManager()->traceStart();
state.started = insert(traceStart, pixmapStartTime - traceStart,
newEvent.urlIndex + 1);
m_data.insert(state.started, newEvent);
@@ -382,8 +382,8 @@ void PixmapCacheModel::loadEvent(const QmlEvent &event, const QmlEventType &type
void PixmapCacheModel::finalize()
{
if (m_lastCacheSizeEvent != -1) {
- insertEnd(m_lastCacheSizeEvent, modelManager()->traceTime()->endTime() -
- startTime(m_lastCacheSizeEvent));
+ insertEnd(m_lastCacheSizeEvent,
+ modelManager()->traceEnd() - startTime(m_lastCacheSizeEvent));
}
resizeUnfinishedLoads();
@@ -446,8 +446,7 @@ void PixmapCacheModel::resizeUnfinishedLoads()
for (auto size = pixmap->sizes.begin(), sizesEnd = pixmap->sizes.end(); size != sizesEnd;
++size) {
if (size->loadState == Loading) {
- insertEnd(size->started,
- modelManager()->traceTime()->endTime() - startTime(size->started));
+ insertEnd(size->started, modelManager()->traceEnd() - startTime(size->started));
size->loadState = Error;
}
}