aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-15 13:30:48 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-22 16:44:33 +0000
commit457bb7a465fc51995fc5ffaa4a1d8a341528d0c4 (patch)
tree0747b80cb5cc3744308ddc699bae42e751a9238e /tools/qmlprofiler
parent97c4ae41f268b3a128285761858e0eb9f6fec27d (diff)
tools: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: If9018391c001eba3b4b2061d06c4caa8136811ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmlprofiler')
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index 048c92bb93..668cb3ce2d 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -403,23 +403,23 @@ void QmlProfilerData::computeQmlTime()
int level = minimumLevel;
for (int i = 0; i < d->startInstanceList.count(); i++) {
- qint64 st = d->startInstanceList[i].startTime;
+ qint64 st = d->startInstanceList.at(i).startTime;
- if (d->startInstanceList[i].data->rangeType == QQmlProfilerDefinitions::Painting) {
+ if (d->startInstanceList.at(i).data->rangeType == QQmlProfilerDefinitions::Painting) {
continue;
}
// general level
- if (endtimesPerLevel[level] > st) {
+ if (endtimesPerLevel.value(level) > st) {
level++;
} else {
while (level > minimumLevel && endtimesPerLevel[level-1] <= st)
level--;
}
- endtimesPerLevel[level] = st + d->startInstanceList[i].duration;
+ endtimesPerLevel[level] = st + d->startInstanceList.at(i).duration;
if (level == minimumLevel) {
- d->qmlMeasuredTime += d->startInstanceList[i].duration;
+ d->qmlMeasuredTime += d->startInstanceList.at(i).duration;
}
}
}