diff options
author | Ulf Hermann <[email protected]> | 2015-04-08 19:05:30 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2015-05-18 10:00:40 +0000 |
commit | d71dfa97bfba9ba42f8d0caae0c32fedd2fe1e8a (patch) | |
tree | 2e796cfbbe6f7dd6c0d32932ed04f6b7515c73e4 /src/plugins/qmlprofiler/qmlprofilertraceview.cpp | |
parent | 50a47cdb4935b0446527bcdee77103e90b958825 (diff) |
Timeline: Remove useless dataAvailable() signals
The only thing they did was trigger some QML code that set the zoom to
10% of the available range. 10% is somewhat arbitrary, so we shouldn't
have it in the general purpose timeline. Also, we don't really have to
pass the signal through several connections just to do that in QML.
The clearChildren() didn't have any effect there as dataAvailable()
should only happen if the view is already cleared.
Change-Id: I1813ed37a82fc3fd5c3b7fc02b2afb1dcbcadcfb
Reviewed-by: Joerg Bornemann <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertraceview.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index b0f61861f71..aced3bc5383 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -98,7 +98,10 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *pro d->m_zoomControl = new Timeline::TimelineZoomControl(this); connect(modelManager->traceTime(), &QmlProfilerTraceTime::timeChanged, - d->m_zoomControl, &Timeline::TimelineZoomControl::setTrace); + [this](qint64 start, qint64 end) { + d->m_zoomControl->setTrace(start, end); + d->m_zoomControl->setRange(start, start + (end - start) / 10); + }); QVBoxLayout *groupLayout = new QVBoxLayout; groupLayout->setContentsMargins(0, 0, 0, 0); @@ -130,8 +133,6 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *pro d->m_modelProxy = new Timeline::TimelineModelAggregator(modelManager->notesModel(), this); d->m_modelManager = modelManager; - connect(modelManager,SIGNAL(dataAvailable()), d->m_modelProxy,SIGNAL(dataAvailable())); - // external models pushed on top foreach (QmlProfilerTimelineModel *timelineModel, QmlProfilerPlugin::instance->getModels(modelManager)) { |