aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2015-03-23 18:50:47 +0100
committerUlf Hermann <[email protected]>2015-03-24 11:36:16 +0000
commita4b3c46250d1e8c4826fdb76b15e0b92aeede2a1 (patch)
treeae6793e95756972bf5bfe6d2256bf0a05f281c98 /src/plugins/qmlprofiler/qmlprofilertraceview.cpp
parent5e805bfb7c307872a527a67d5705a1aa04aa22f0 (diff)
Timeline: Centralize the selection in zoom control.
This is where it logically belongs, given that trace, window, and range are already there. Also, it fixes the types to qint64, making it easier to reason about type conversions and numerical overflows. Change-Id: I2f88b2646b9a649d34bdf4fe87c37e7afdeee078 Task-number: QTCREATORBUG-14170 Reviewed-by: Joerg Bornemann <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceview.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index 94d71028bcc..a4d60a9d7a3 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -171,18 +171,12 @@ bool QmlProfilerTraceView::hasValidSelection() const
qint64 QmlProfilerTraceView::selectionStart() const
{
- QQuickItem *rootObject = d->m_mainView->rootObject();
- if (rootObject)
- return rootObject->property("selectionRangeStart").toLongLong();
- return 0;
+ return d->m_zoomControl->selectionStart();
}
qint64 QmlProfilerTraceView::selectionEnd() const
{
- QQuickItem *rootObject = d->m_mainView->rootObject();
- if (rootObject)
- return rootObject->property("selectionRangeEnd").toLongLong();
- return 0;
+ return d->m_zoomControl->selectionEnd();
}
void QmlProfilerTraceView::clear()