Commit 70102410 authored by Ulf Hermann's avatar Ulf Hermann Committed by Ulf Hermann
Browse files

QmlProfiler: Centralize trace/window/range times



Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.

Stating the times as properties allows us to use bindings in more
places, too.

Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
parent ec118e04
......@@ -138,24 +138,6 @@ int AbstractTimelineModel::height() const
return d->rowOffsets.last() + (depth - d->rowOffsets.size()) * DefaultRowHeight;
}
qint64 AbstractTimelineModel::traceStartTime() const
{
Q_D(const AbstractTimelineModel);
return d->modelManager->traceTime()->startTime();
}
qint64 AbstractTimelineModel::traceEndTime() const
{
Q_D(const AbstractTimelineModel);
return d->modelManager->traceTime()->endTime();
}
qint64 AbstractTimelineModel::traceDuration() const
{
Q_D(const AbstractTimelineModel);
return d->modelManager->traceTime()->duration();
}
QVariantMap AbstractTimelineModel::location(int index) const
{
Q_UNUSED(index);
......
......@@ -64,9 +64,6 @@ public:
void setRowHeight(int rowNumber, int height);
int height() const;
qint64 traceStartTime() const;
qint64 traceEndTime() const;
qint64 traceDuration() const;
bool accepted(const QmlProfilerDataModel::QmlEventTypeData &event) const;
bool expanded() const;
bool hidden() const;
......
......@@ -40,7 +40,7 @@ Rectangle {
property alias selectionLocked : view.selectionLocked
property bool lockItemSelection : false
property real mainviewTimePerPixel : 0
property real mainviewTimePerPixel: zoomControl.rangeDuration / root.width
signal updateCursorPosition
property string fileName: ""
......@@ -60,14 +60,8 @@ Rectangle {
Connections {
target: zoomControl
onRangeChanged: {
var startTime = zoomControl.startTime();
var endTime = zoomControl.endTime();
mainviewTimePerPixel = Math.abs(endTime - startTime) / root.width;
backgroundMarks.updateMarks(startTime, endTime);
view.startTime = startTime;
view.endTime = endTime;
backgroundMarks.updateMarks(zoomControl.rangeStart, zoomControl.rangeEnd);
zoomSliderToolBar.updateZoomLevel();
view.updateWindow();
}
onWindowChanged: {
......@@ -80,9 +74,8 @@ Rectangle {
target: qmlProfilerModelProxy
onDataAvailable: {
view.clearData();
zoomControl.setRange(qmlProfilerModelProxy.traceStartTime(),
qmlProfilerModelProxy.traceStartTime() +
qmlProfilerModelProxy.traceDuration()/10);
zoomControl.setRange(zoomControl.traceStart,
zoomControl.traceStart + zoomControl.traceDuration / 10);
view.requestPaint();
}
onStateChanged: backgroundMarks.requestPaint()
......@@ -106,11 +99,9 @@ Rectangle {
flick.contentX = 0;
flick.contentWidth = 0;
view.clearData();
view.startTime = view.endTime = 0;
rangeDetails.hide();
selectionRangeMode = false;
buttonsBar.updateRangeButton(selectionRangeMode);
zoomControl.setRange(0,0);
zoomSlider.externalUpdate = true;
zoomSlider.value = zoomSlider.minimumValue;
overview.clear();
......@@ -122,13 +113,9 @@ Rectangle {
}
function recenter( centerPoint ) {
var windowLength = view.endTime - view.startTime;
var newStart = Math.floor(centerPoint - windowLength/2);
if (newStart < 0)
newStart = 0;
if (newStart + windowLength > qmlProfilerModelProxy.traceEndTime())
newStart = qmlProfilerModelProxy.traceEndTime() - windowLength;
zoomControl.setRange(newStart, newStart + windowLength);
var newStart = Math.floor(centerPoint - zoomControl.rangeDuration / 2);
zoomControl.setRange(Math.max(newStart, zoomControl.traceStart),
Math.min(newStart + zoomControl.rangeDuration, zoomControl.traceEnd));
}
function recenterOnItem(modelIndex, itemIndex)
......@@ -137,8 +124,8 @@ Rectangle {
return;
// if item is outside of the view, jump back to its position
if (qmlProfilerModelProxy.endTime(modelIndex, itemIndex) < view.startTime ||
qmlProfilerModelProxy.startTime(modelIndex, itemIndex) > view.endTime) {
if (qmlProfilerModelProxy.endTime(modelIndex, itemIndex) < zoomControl.rangeStart ||
qmlProfilerModelProxy.startTime(modelIndex, itemIndex) > zoomControl.rangeEnd) {
recenter((qmlProfilerModelProxy.startTime(modelIndex, itemIndex) +
qmlProfilerModelProxy.endTime(modelIndex, itemIndex)) / 2);
}
......@@ -278,7 +265,7 @@ Rectangle {
Flickable {
id: flick
contentHeight: labels.height
contentWidth: 0
contentWidth: zoomControl.windowDuration * width / Math.max(1, zoomControl.rangeDuration)
flickableDirection: Flickable.HorizontalAndVerticalFlick
boundsBehavior: Flickable.StopAtBounds
clip:true
......@@ -290,12 +277,6 @@ Rectangle {
onInteractiveChanged: interactive = stayInteractive
onStayInteractiveChanged: interactive = stayInteractive
onWidthChanged: {
var duration = Math.abs(zoomControl.endTime() - zoomControl.startTime());
if (duration > 0)
contentWidth = zoomControl.windowLength() * width / duration;
}
// ***** child items
TimeMarks {
id: backgroundMarks
......@@ -315,6 +296,7 @@ Rectangle {
id: view
profilerModelProxy: qmlProfilerModelProxy
zoomer: zoomControl
x: flick.contentX
y: flick.contentY
......@@ -323,7 +305,6 @@ Rectangle {
width: scroller.width
height: flick.height
onEndTimeChanged: requestPaint()
onYChanged: requestPaint()
onHeightChanged: requestPaint()
property bool recursionGuard: false
......@@ -331,39 +312,38 @@ Rectangle {
property int intX: x
property int intWidth: width
onIntXChanged: {
// Don't updateZoomControl if we're just updating the flick range, _from_
// zoomControl. The other way round is OK. We _want_ the flick range to be updated
// on external changes to zoomControl.
if (recursionGuard)
return;
var newStartTime = intX * (endTime - startTime) / intWidth +
zoomControl.windowStart();
if (Math.abs(newStartTime - startTime) >= 1) {
var newEndTime = (intX + intWidth) * (endTime - startTime) / intWidth +
zoomControl.windowStart();
recursionGuard = true;
var newStartTime = intX * zoomControl.rangeDuration / intWidth +
zoomControl.windowStart;
if (Math.abs(newStartTime - zoomControl.rangeStart) >= 1) {
var newEndTime = (intX + intWidth) * zoomControl.rangeDuration / intWidth +
zoomControl.windowStart;
zoomControl.setRange(newStartTime, newEndTime);
}
recursionGuard = false;
}
function updateWindow() {
var duration = zoomControl.duration();
if (recursionGuard || duration <= 0)
if (recursionGuard || zoomControl.rangeDuration <= 0)
return;
recursionGuard = true;
if (!flick.movingHorizontally) {
// This triggers an unwanted automatic change in contentX. We ignore that by
// checking recursionGuard in this function and in updateZoomControl.
flick.contentWidth = zoomControl.windowLength() * intWidth / duration;
// This triggers an unwanted automatic change in contentX. We ignore that by
// checking recursionGuard in this function and in updateZoomControl.
flick.contentWidth = zoomControl.windowDuration * intWidth /
zoomControl.rangeDuration;
var newStartX = (startTime - zoomControl.windowStart()) * intWidth /
duration;
var newStartX = (zoomControl.rangeStart - zoomControl.windowStart) * intWidth /
zoomControl.rangeDuration;
if (isFinite(newStartX) && Math.abs(newStartX - flick.contentX) >= 1)
flick.contentX = newStartX;
if (isFinite(newStartX) && Math.abs(newStartX - intX) >= 1)
flick.contentX = newStartX;
}
recursionGuard = false;
}
......@@ -490,8 +470,8 @@ Rectangle {
function updateZoomLevel() {
zoomSlider.externalUpdate = true;
zoomSlider.value = Math.pow((view.endTime - view.startTime) /
zoomControl.windowLength(),
zoomSlider.value = Math.pow(zoomControl.rangeDuration /
Math.max(1, zoomControl.windowDuration),
1 / zoomSlider.exponent) * zoomSlider.maximumValue;
}
......@@ -508,7 +488,7 @@ Rectangle {
property int minWindowLength: 1e5 // 0.1 ms
onValueChanged: {
if (externalUpdate || zoomControl.windowEnd() <= zoomControl.windowStart()) {
if (externalUpdate || zoomControl.windowEnd <= zoomControl.windowStart) {
// Zoom range is independently updated. We shouldn't mess
// with it here as otherwise we might introduce rounding
// or arithmetic errors.
......@@ -517,18 +497,19 @@ Rectangle {
}
var windowLength = Math.max(
Math.pow(value / maximumValue, exponent) * zoomControl.windowLength(),
Math.pow(value / maximumValue, exponent) * zoomControl.windowDuration,
minWindowLength);
var fixedPoint = (view.startTime + view.endTime) / 2;
var fixedPoint = (zoomControl.rangeStart + zoomControl.rangeEnd) / 2;
if (view.selectedItem !== -1) {
// center on selected item if it's inside the current screen
var newFixedPoint = qmlProfilerModelProxy.startTime(view.selectedModel, view.selectedItem);
if (newFixedPoint >= view.startTime && newFixedPoint < view.endTime)
if (newFixedPoint >= zoomControl.rangeStart &&
newFixedPoint < zoomControl.rangeEnd)
fixedPoint = newFixedPoint;
}
var startTime = Math.max(zoomControl.windowStart(), fixedPoint - windowLength / 2)
var startTime = Math.max(zoomControl.windowStart, fixedPoint - windowLength / 2)
zoomControl.setRange(startTime, startTime + windowLength);
}
}
......
......@@ -31,6 +31,7 @@
.pragma library
var qmlProfilerModelProxy = 0;
var zoomControl = 0;
//draw background of the graph
function drawGraph(canvas, ctxt)
......@@ -42,19 +43,17 @@ function drawGraph(canvas, ctxt)
//draw the actual data to be graphed
function drawData(canvas, ctxt)
{
if ((!qmlProfilerModelProxy) || qmlProfilerModelProxy.isEmpty())
if (!zoomControl || !qmlProfilerModelProxy || qmlProfilerModelProxy.isEmpty())
return;
var spacing = canvas.width / qmlProfilerModelProxy.traceDuration();
for (var modelIndex = 0; modelIndex < qmlProfilerModelProxy.modelCount(); ++modelIndex) {
for (var ii = canvas.offset; ii < qmlProfilerModelProxy.count(modelIndex);
ii += canvas.increment) {
var xx = (qmlProfilerModelProxy.startTime(modelIndex,ii) -
qmlProfilerModelProxy.traceStartTime()) * spacing;
var xx = (qmlProfilerModelProxy.startTime(modelIndex,ii) - zoomControl.traceStart) *
canvas.spacing;
var eventWidth = qmlProfilerModelProxy.duration(modelIndex,ii) * spacing;
var eventWidth = qmlProfilerModelProxy.duration(modelIndex,ii) * canvas.spacing;
if (eventWidth < 1)
eventWidth = 1;
......@@ -75,14 +74,13 @@ function drawBindingLoops(canvas, ctxt) {
ctxt.strokeStyle = "orange";
ctxt.lineWidth = 2;
var radius = 1;
var spacing = canvas.width / qmlProfilerModelProxy.traceDuration();
for (var modelIndex = 0; modelIndex < qmlProfilerModelProxy.modelCount(); ++modelIndex) {
for (var ii = canvas.offset - canvas.increment; ii < qmlProfilerModelProxy.count(modelIndex);
ii += canvas.increment) {
if (qmlProfilerModelProxy.bindingLoopDest(modelIndex,ii) >= 0) {
var xcenter = Math.round(qmlProfilerModelProxy.startTime(modelIndex,ii) +
qmlProfilerModelProxy.duration(modelIndex,ii) -
qmlProfilerModelProxy.traceStartTime()) * spacing;
zoomControl.traceStart) * canvas.spacing;
var ycenter = Math.round(canvas.bump + canvas.blockHeight * modelIndex +
canvas.blockHeight / 2);
ctxt.beginPath();
......@@ -95,10 +93,10 @@ function drawBindingLoops(canvas, ctxt) {
function drawNotes(canvas, ctxt)
{
if ((!qmlProfilerModelProxy) || qmlProfilerModelProxy.noteCount() === 0)
if (!zoomControl || !qmlProfilerModelProxy || qmlProfilerModelProxy.noteCount() === 0)
return;
var spacing = canvas.width / qmlProfilerModelProxy.traceDuration();
var spacing = canvas.width / zoomControl.traceDuration;
// divide canvas height in 7 parts: margin, 3*line, space, dot, margin
var vertSpace = (canvas.height - canvas.bump) / 7;
......@@ -109,13 +107,11 @@ function drawNotes(canvas, ctxt)
var timelineIndex = qmlProfilerModelProxy.noteTimelineIndex(i);
if (timelineIndex === -1)
continue;
var traceStart = qmlProfilerModelProxy.traceStartTime();
var traceEnd = qmlProfilerModelProxy.traceEndTime();
var start = Math.max(qmlProfilerModelProxy.startTime(timelineModel, timelineIndex),
traceStart);
zoomControl.traceStart);
var end = Math.min(qmlProfilerModelProxy.endTime(timelineModel, timelineIndex),
traceEnd);
var annoX = Math.round(((start + end) / 2 - traceStart) * spacing);
zoomControl.traceStart);
var annoX = Math.round(((start + end) / 2 - zoomControl.traceStart) * spacing);
ctxt.moveTo(annoX, canvas.bump + vertSpace)
ctxt.lineTo(annoX, canvas.bump + vertSpace * 4)
......@@ -128,26 +124,21 @@ function drawNotes(canvas, ctxt)
function drawTimeBar(canvas, ctxt)
{
if (!qmlProfilerModelProxy)
if (!zoomControl)
return;
var width = canvas.width;
var height = 10;
var startTime = qmlProfilerModelProxy.traceStartTime();
var endTime = qmlProfilerModelProxy.traceEndTime();
var totalTime = qmlProfilerModelProxy.traceDuration();
var spacing = width / totalTime;
var initialBlockLength = 120;
var timePerBlock = Math.pow(2, Math.floor( Math.log( totalTime / width *
var timePerBlock = Math.pow(2, Math.floor( Math.log( zoomControl.traceDuration / width *
initialBlockLength ) / Math.LN2 ) );
var pixelsPerBlock = timePerBlock * spacing;
var pixelsPerBlock = timePerBlock * canvas.spacing;
var pixelsPerSection = pixelsPerBlock / 5;
var blockCount = width / pixelsPerBlock;
var realStartTime = Math.floor(startTime/timePerBlock) * timePerBlock;
var realStartPos = (startTime-realStartTime) * spacing;
var realStartTime = Math.floor(zoomControl.traceStart / timePerBlock) * timePerBlock;
var realStartPos = (zoomControl.traceStart - realStartTime) * canvas.spacing;
var timePerPixel = timePerBlock/pixelsPerBlock;
......
......@@ -42,12 +42,11 @@ Canvas {
property int offset: -1
readonly property int bump: 10;
readonly property int blockHeight: (height - bump) / qmlProfilerModelProxy.models.length;
readonly property double spacing: width / zoomControl.traceDuration
// ***** properties
height: 50
property bool dataReady: false
property double startTime : 0
property double endTime : 0
property bool recursionGuard: false
onWidthChanged: offset = -1
......@@ -64,10 +63,11 @@ Canvas {
function updateRange() {
if (recursionGuard)
return;
var newStartTime = Math.round(rangeMover.rangeLeft * qmlProfilerModelProxy.traceDuration() / width) + qmlProfilerModelProxy.traceStartTime();
var newEndTime = Math.round(rangeMover.rangeRight * qmlProfilerModelProxy.traceDuration() / width) + qmlProfilerModelProxy.traceStartTime();
if (startTime !== newStartTime || endTime !== newEndTime)
zoomControl.setRange(newStartTime, Math.max(newEndTime, newStartTime + 500));
var newStartTime = Math.round(rangeMover.rangeLeft * zoomControl.traceDuration / width) +
zoomControl.traceStart;
var newEndTime = Math.max(Math.round(rangeMover.rangeRight * zoomControl.traceDuration /
width) + zoomControl.traceStart, newStartTime + 500);
zoomControl.setRange(newStartTime, newEndTime);
}
function clamp(val, min, max) {
......@@ -78,21 +78,18 @@ Canvas {
Connections {
target: zoomControl
onRangeChanged: {
if (qmlProfilerModelProxy) {
recursionGuard = true;
startTime = clamp(zoomControl.startTime(), qmlProfilerModelProxy.traceStartTime(), qmlProfilerModelProxy.traceEndTime());
endTime = clamp(zoomControl.endTime(), startTime, qmlProfilerModelProxy.traceEndTime());
var newRangeX = (startTime - qmlProfilerModelProxy.traceStartTime()) * width / qmlProfilerModelProxy.traceDuration();
var newWidth = (endTime - startTime) * width / qmlProfilerModelProxy.traceDuration();
var widthChanged = Math.abs(newWidth - rangeMover.rangeWidth) > 1;
var leftChanged = Math.abs(newRangeX - rangeMover.rangeLeft) > 1;
if (leftChanged)
rangeMover.rangeLeft = newRangeX;
if (leftChanged || widthChanged)
rangeMover.rangeRight = newRangeX + newWidth;
recursionGuard = false;
}
recursionGuard = true;
var newRangeX = (zoomControl.rangeStart - zoomControl.traceStart) * width /
zoomControl.traceDuration;
var newWidth = zoomControl.rangeDuration * width / zoomControl.traceDuration;
var widthChanged = Math.abs(newWidth - rangeMover.rangeWidth) > 1;
var leftChanged = Math.abs(newRangeX - rangeMover.rangeLeft) > 1;
if (leftChanged)
rangeMover.rangeLeft = newRangeX;
if (leftChanged || widthChanged)
rangeMover.rangeRight = newRangeX + newWidth;
recursionGuard = false;
}
}
......@@ -123,6 +120,7 @@ Canvas {
var context = (canvas.context === null) ? getContext("2d") : canvas.context;
Plotter.qmlProfilerModelProxy = qmlProfilerModelProxy;
Plotter.zoomControl = zoomControl;
if (offset < 0) {
context.reset();
......
......@@ -39,7 +39,7 @@ RangeMover {
property string endTimeString: detailedPrintTime(startTime+duration)
property string durationString: detailedPrintTime(duration)
property double startTime: rangeLeft * viewTimePerPixel + zoomControl.windowStart()
property double startTime: rangeLeft * viewTimePerPixel + zoomControl.windowStart
property double duration: Math.max(rangeWidth * viewTimePerPixel, 500)
property double viewTimePerPixel: 1
property double creationReference : 0
......@@ -49,7 +49,7 @@ RangeMover {
target: zoomControl
onRangeChanged: {
var oldTimePerPixel = selectionRange.viewTimePerPixel;
selectionRange.viewTimePerPixel = Math.abs(zoomControl.endTime() - zoomControl.startTime()) / view.intWidth;
selectionRange.viewTimePerPixel = zoomControl.rangeDuration / view.intWidth;
if (creationState === 3 && oldTimePerPixel != selectionRange.viewTimePerPixel) {
var newWidth = rangeWidth * oldTimePerPixel / viewTimePerPixel;
rangeLeft = rangeLeft * oldTimePerPixel / viewTimePerPixel;
......
......@@ -36,16 +36,9 @@ Canvas {
objectName: "TimeDisplay"
contextType: "2d"
property real startTime : 0
property real endTime : 0
Connections {
target: zoomControl
onRangeChanged: {
startTime = zoomControl.startTime();
endTime = zoomControl.endTime();
requestPaint();
}
onRangeChanged: requestPaint();
}
onPaint: {
......@@ -55,7 +48,7 @@ Canvas {
context.fillStyle = "white";
context.fillRect(0, 0, width, height);
var totalTime = Math.max(1, endTime - startTime);
var totalTime = Math.max(1, zoomControl.rangeDuration);
var spacing = width / totalTime;
var initialBlockLength = 120;
......@@ -64,8 +57,8 @@ Canvas {
var pixelsPerSection = pixelsPerBlock / 5;
var blockCount = width / pixelsPerBlock;
var realStartTime = Math.floor(startTime/timePerBlock) * timePerBlock;
var startPos = (startTime - realStartTime) * spacing;
var realStartTime = Math.floor(zoomControl.rangeStart / timePerBlock) * timePerBlock;
var startPos = (zoomControl.rangeStart - realStartTime) * spacing;
var timePerPixel = timePerBlock/pixelsPerBlock;
......@@ -98,7 +91,6 @@ Canvas {
function clear()
{
startTime = endTime = 0;
requestPaint();
}
......@@ -106,16 +98,15 @@ Canvas {
{
var round = 1;
var barrier = 1;
var range = endTime - startTime;
var units = ["μs", "ms", "s"];
for (var i = 0; i < units.length; ++i) {
barrier *= 1000;
if (range < barrier)
if (zoomControl.rangeDuration < barrier)
round *= 1000;
else if (range < barrier * 10)
else if (zoomControl.rangeDuration < barrier * 10)
round *= 100;
else if (range < barrier * 100)
else if (zoomControl.rangeDuration < barrier * 100)
round *= 10;
if (t < barrier * 1000)
return Math.floor(t / (barrier / round)) / round + units[i];
......
......@@ -32,7 +32,8 @@ SOURCES += \
sortedtimelinemodel.cpp \
qmlprofilerbasemodel.cpp \
qmlprofilerdatamodel.cpp \
notesmodel.cpp
notesmodel.cpp \
timelinezoomcontrol.cpp
HEADERS += \
qmlprofilerconstants.h \
......@@ -67,7 +68,8 @@ HEADERS += \
abstracttimelinemodel_p.h \
qmlprofilerdatamodel.h \
qmlprofilerbasemodel_p.h \
notesmodel.h
notesmodel.h \
timelinezoomcontrol.h
RESOURCES += \
qml/qmlprofiler.qrc
......
......@@ -52,6 +52,7 @@ QtcPlugin {
"sortedtimelinemodel.h", "sortedtimelinemodel.cpp",
"timelinemodelaggregator.cpp", "timelinemodelaggregator.h",
"timelinerenderer.cpp", "timelinerenderer.h",
"timelinezoomcontrol.cpp", "timelinezoomcontrol.h"
]
}
......
......@@ -219,9 +219,9 @@ void QmlProfilerClientManager::disconnectClientSignals()
SLOT(addQmlEvent(int,int,qint64,qint64,QStringList,QmlDebug::QmlEventLocation,
qint64,qint64,qint64,qint64,qint64)));
disconnect(d->qmlclientplugin.data(), SIGNAL(traceFinished(qint64)),
d->modelManager->traceTime(), SLOT(setEndTime(qint64)));
d->modelManager->traceTime(), SLOT(increaseEndTime(qint64)));
disconnect(d->qmlclientplugin.data(), SIGNAL(traceStarted(qint64)),
d->modelManager->traceTime(), SLOT(setStartTime(qint64)));
d->modelManager->traceTime(), SLOT(decreaseStartTime(qint64)));
disconnect(d->qmlclientplugin.data(), SIGNAL(enabledChanged()),
d->qmlclientplugin.data(), SLOT(sendRecordingStatus()));
// fixme: this should be unified for both clients
......@@ -339,8 +339,7 @@ void QmlProfilerClientManager::retryMessageBoxFinished(int result)
void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
{
if (maximumTime > d->modelManager->traceTime()->endTime())
d->modelManager->traceTime()->setEndTime(maximumTime);
d->modelManager->traceTime()->increaseEndTime(maximumTime);
d->qmlDataReady = true;
if (!d->v8clientplugin ||
d->v8clientplugin.data()->state() != QmlDebug::QmlDebugClient::Enabled ||
......
......@@ -121,10 +121,12 @@ const QVector<QmlProfilerDataModel::QmlEventNoteData> &QmlProfilerDataModel::get
return d->eventNotes;
}
void QmlProfilerDataModel::setData(const QVector<QmlProfilerDataModel::QmlEventTypeData> &types,
void QmlProfilerDataModel::setData(qint64 traceStart, qint64 traceEnd,
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types,
const QVector<QmlProfilerDataModel::QmlEventData> &events)
{
Q_D(QmlProfilerDataModel);
d->modelManager->traceTime()->setTime(traceStart, traceEnd);
d->eventList = events;
d->eventTypes = types;
for (int id = 0; id < types.count(); ++id)
......@@ -260,7 +262,7 @@ void QmlProfilerDataModel::addQmlEvent(QmlDebug::Message message, QmlDebug::Rang
d->eventList.append(eventData);
d->modelManager->modelProxyCountUpdated(d->modelId, startTime,
d->modelManager->estimatedProfilingTime() * 2);
d->modelManager->traceTime()->duration() * 2);