Commit d71dfa97 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

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: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 50a47cdb
......@@ -79,16 +79,6 @@ Rectangle {
}
}
Connections {
target: timelineModelAggregator
onDataAvailable: {
content.clearChildren();
zoomControl.setRange(zoomControl.traceStart,
zoomControl.traceStart + zoomControl.traceDuration / 10);
}
}
onSelectionRangeModeChanged: {
selectionRange.reset();
buttonsBar.updateRangeButton(selectionRangeMode);
......
......@@ -63,7 +63,6 @@ public:
Q_INVOKABLE QVariantMap prevItem(int selectedModel, int selectedItem, qint64 time) const;
signals:
void dataAvailable();
void stateChanged();
void modelsChanged();
void heightChanged();
......
......@@ -337,7 +337,6 @@ void QmlProfilerModelManager::complete()
// Load notes after the timeline models have been initialized.
d->notesModel->loadData();
setState(QmlProfilerDataState::Done);
emit dataAvailable();
break;
case QmlProfilerDataState::AcquiringData:
// Make sure the trace fits into the time span.
......
......@@ -136,7 +136,6 @@ signals:
void error(const QString &error);
void stateChanged();
void progressChanged();
void dataAvailable();
void loadFinished();
void saveFinished();
......
......@@ -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)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment