QmlProfiler: Keep an extra time window in ZoomControl

This window is dynamically sized so that no integer overflows can occur
when using it in the timeline view instead of the whole trace time.

Task-number: QTCREATORBUG-11879
Change-Id: Id86faaf614b5f833e47ce26bb859b63eb09e7547
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-03-28 16:06:07 +01:00
parent a0239e3e71
commit be1a94ef1f
4 changed files with 126 additions and 8 deletions

View File

@@ -112,18 +112,24 @@ qint64 QmlProfilerTraceTime::duration() const
void QmlProfilerTraceTime::clear()
{
m_startTime = -1;
m_endTime = -1;
setStartTime(-1);
setEndTime(-1);
}
void QmlProfilerTraceTime::setStartTime(qint64 time)
{
m_startTime = time;
if (time != m_startTime) {
m_startTime = time;
emit startTimeChanged(time);
}
}
void QmlProfilerTraceTime::setEndTime(qint64 time)
{
m_endTime = time;
if (time != m_endTime) {
m_endTime = time;
emit endTimeChanged(time);
}
}