summaryrefslogtreecommitdiff
path: root/plugins/qmlprofilerextension
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-07-09 13:01:34 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-07-09 13:02:21 +0200
commit645ee14ce4d275864eab697b15bc67f8bbc24944 (patch)
tree56f60f93bf6890ab49b373f29527976557980d6f /plugins/qmlprofilerextension
parentcc4602b3f898a9b7510682eee45a02786097eb67 (diff)
parent114c1dbc885abf7dd207d3f77ec3b146e7f3fe28 (diff)
downloadqt-creator-645ee14ce4d275864eab697b15bc67f8bbc24944.tar.gz
Merge branch '3.2'
Change-Id: I15f9db0dd9d65ceaff9503c535abd7abcbd1eccc
Diffstat (limited to 'plugins/qmlprofilerextension')
-rw-r--r--plugins/qmlprofilerextension/memoryusagemodel.cpp4
-rw-r--r--plugins/qmlprofilerextension/pixmapcachemodel.cpp15
2 files changed, 17 insertions, 2 deletions
diff --git a/plugins/qmlprofilerextension/memoryusagemodel.cpp b/plugins/qmlprofilerextension/memoryusagemodel.cpp
index 8cf9a42158..8bd6ff2741 100644
--- a/plugins/qmlprofilerextension/memoryusagemodel.cpp
+++ b/plugins/qmlprofilerextension/memoryusagemodel.cpp
@@ -269,10 +269,10 @@ void MemoryUsageModel::loadData()
}
if (currentJSHeapIndex != -1)
- d->insertEnd(currentJSHeapIndex, simpleModel->lastTimeMark() -
+ d->insertEnd(currentJSHeapIndex, traceEndTime() -
d->range(currentJSHeapIndex).start - 1);
if (currentUsageIndex != -1)
- d->insertEnd(currentUsageIndex, simpleModel->lastTimeMark() -
+ d->insertEnd(currentUsageIndex, traceEndTime() -
d->range(currentUsageIndex).start - 1);
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.cpp b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
index ea297b04bc..f3b8a02761 100644
--- a/plugins/qmlprofilerextension/pixmapcachemodel.cpp
+++ b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
@@ -456,6 +456,21 @@ void PixmapCacheModel::loadData()
if (state.loadState == Initial) {
newEvent.pixmapEventType = PixmapLoadingStarted;
state.started = d->insert(traceStartTime(), startTime - traceStartTime(), newEvent);
+
+ // All other indices are wrong now as we've prepended. Fix them ...
+ if (lastCacheSizeEvent >= state.started)
+ ++lastCacheSizeEvent;
+
+ for (int pixmapIndex = 0; pixmapIndex < d->pixmaps.count(); ++pixmapIndex) {
+ Pixmap &brokenPixmap = d->pixmaps[pixmapIndex];
+ for (int sizeIndex = 0; sizeIndex < brokenPixmap.sizes.count(); ++sizeIndex) {
+ PixmapState &brokenSize = brokenPixmap.sizes[sizeIndex];
+ if ((pixmapIndex != newEvent.urlIndex || sizeIndex != newEvent.sizeIndex) &&
+ brokenSize.started >= state.started) {
+ ++brokenSize.started;
+ }
+ }
+ }
}
d->insertEnd(state.started, startTime - d->range(state.started).start);