aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerclient.cpp
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2012-05-02 17:32:57 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-04 15:19:25 +0200
commit3b66a38e58fe030b6d2c4cd12c9884af660652a9 (patch)
treef5effe0e4d7aac0ed4073f0fc2c1e5bb99108534 /tools/qmlprofiler/qmlprofilerclient.cpp
parent6f3bda0dce945a5fc75d8ebad302820fe9979d9b (diff)
QmlProfiler: storing binding type
Change-Id: If1f02e1e6f6ce6aba9874a63d01a08d57571f991 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'tools/qmlprofiler/qmlprofilerclient.cpp')
-rw-r--r--tools/qmlprofiler/qmlprofilerclient.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/qmlprofiler/qmlprofilerclient.cpp b/tools/qmlprofiler/qmlprofilerclient.cpp
index 97ed90e890..103eab8402 100644
--- a/tools/qmlprofiler/qmlprofilerclient.cpp
+++ b/tools/qmlprofiler/qmlprofilerclient.cpp
@@ -118,6 +118,7 @@ public:
QStack<qint64> rangeStartTimes[QQmlProfilerService::MaximumRangeType];
QStack<QStringList> rangeDatas[QQmlProfilerService::MaximumRangeType];
QStack<QmlEventLocation> rangeLocations[QQmlProfilerService::MaximumRangeType];
+ QStack<QQmlProfilerService::BindingType> bindingTypes;
int rangeCount[QQmlProfilerService::MaximumRangeType];
qint64 maximumTime;
};
@@ -138,6 +139,7 @@ void QmlProfilerClient::clearData()
{
::memset(d->rangeCount, 0,
QQmlProfilerService::MaximumRangeType * sizeof(int));
+ d->bindingTypes.clear();
ProfilerClient::clearData();
}
@@ -195,6 +197,14 @@ void QmlProfilerClient::messageReceived(const QByteArray &data)
d->rangeStartTimes[range].push(time);
d->inProgressRanges |= (static_cast<qint64>(1) << range);
++d->rangeCount[range];
+
+ // read binding type
+ if (range == (int)QQmlProfilerService::Binding) {
+ int bindingType = (int)QQmlProfilerService::QmlBinding;
+ if (!stream.atEnd())
+ stream >> bindingType;
+ d->bindingTypes.push((QQmlProfilerService::BindingType)bindingType);
+ }
} else if (messageType == QQmlProfilerService::RangeData) {
QString data;
stream >> data;
@@ -232,8 +242,11 @@ void QmlProfilerClient::messageReceived(const QByteArray &data)
d->rangeLocations[range].pop() : QmlEventLocation();
qint64 startTime = d->rangeStartTimes[range].pop();
+ QQmlProfilerService::BindingType bindingType = QQmlProfilerService::QmlBinding;
+ if (range == (int)QQmlProfilerService::Binding)
+ bindingType = d->bindingTypes.pop();
emit this->range((QQmlProfilerService::RangeType)range,
- startTime, time - startTime, data, location);
+ bindingType, startTime, time - startTime, data, location);
if (d->rangeCount[range] == 0) {
int count = d->rangeDatas[range].count() +
d->rangeStartTimes[range].count() +