diff --git a/src/plugins/qmlprofiler/abstracttimelinemodel.cpp b/src/plugins/qmlprofiler/abstracttimelinemodel.cpp index c5b380fbcac..2f10e17e064 100644 --- a/src/plugins/qmlprofiler/abstracttimelinemodel.cpp +++ b/src/plugins/qmlprofiler/abstracttimelinemodel.cpp @@ -192,11 +192,6 @@ void AbstractTimelineModel::dataChanged() default: break; } - - emit stateChanged(); - emit dataAvailable(); - emit emptyChanged(); - emit expandedChanged(); } bool AbstractTimelineModel::eventAccepted(const QmlProfilerDataModel::QmlEventTypeData &event) const diff --git a/src/plugins/qmlprofiler/abstracttimelinemodel.h b/src/plugins/qmlprofiler/abstracttimelinemodel.h index 9eeabeb41b7..813384d989e 100644 --- a/src/plugins/qmlprofiler/abstracttimelinemodel.h +++ b/src/plugins/qmlprofiler/abstracttimelinemodel.h @@ -90,9 +90,6 @@ public: Q_INVOKABLE virtual float getHeight(int index) const; signals: - void dataAvailable(); - void stateChanged(); - void emptyChanged(); void expandedChanged(); protected: diff --git a/src/plugins/qmlprofiler/qml/CategoryLabel.qml b/src/plugins/qmlprofiler/qml/CategoryLabel.qml index b1febce69d6..c3240352347 100644 --- a/src/plugins/qmlprofiler/qml/CategoryLabel.qml +++ b/src/plugins/qmlprofiler/qml/CategoryLabel.qml @@ -53,6 +53,8 @@ Item { } function getDescriptions() { + expanded = qmlProfilerModelProxy.expanded(modelIndex); + backgroundMarks.requestPaint(); visible = qmlProfilerModelProxy.rowCount(modelIndex) > 0; if (!visible) return; @@ -75,8 +77,6 @@ Item { Connections { target: qmlProfilerModelProxy onExpandedChanged: { - expanded = qmlProfilerModelProxy.expanded(modelIndex); - backgroundMarks.requestPaint(); getDescriptions(); } diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp b/src/plugins/qmlprofiler/timelinemodelaggregator.cpp index 9054dccbf6f..0d7bb543c2f 100644 --- a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp +++ b/src/plugins/qmlprofiler/timelinemodelaggregator.cpp @@ -82,14 +82,15 @@ void TimelineModelAggregator::setModelManager(QmlProfilerModelManager *modelMana rangeModel->setModelManager(modelManager); addModel(rangeModel); } + + // Connect this last so that it's executed after the models have updated their data. + connect(modelManager->qmlModel(),SIGNAL(changed()),this,SIGNAL(stateChanged())); } void TimelineModelAggregator::addModel(AbstractTimelineModel *m) { d->modelList << m; - connect(m,SIGNAL(emptyChanged()),this,SIGNAL(emptyChanged())); connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged())); - connect(m,SIGNAL(stateChanged()),this,SIGNAL(stateChanged())); } QStringList TimelineModelAggregator::categoryTitles() const diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.h b/src/plugins/qmlprofiler/timelinemodelaggregator.h index ce5d5dca0e2..8e1a933cb9b 100644 --- a/src/plugins/qmlprofiler/timelinemodelaggregator.h +++ b/src/plugins/qmlprofiler/timelinemodelaggregator.h @@ -92,7 +92,6 @@ public: signals: void dataAvailable(); void stateChanged(); - void emptyChanged(); void expandedChanged(); protected slots: