QmlProfiler: Methods for dispatching events by feature

When announcing features models have to provide functions that handle
events for those features now. The model manager gets a function to
dispatch events to the models that subscribe to them.

Change-Id: I3fd80443a68ba264a513d8d53ed473cf072f1dc7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Ulf Hermann
2016-04-28 16:19:17 +02:00
parent 911c8842b2
commit 1e8996b438
8 changed files with 77 additions and 9 deletions

View File

@@ -80,9 +80,14 @@ QmlProfilerModelManager *QmlProfilerTimelineModel::modelManager() const
return m_modelManager;
}
void QmlProfilerTimelineModel::announceFeatures(quint64 features) const
void QmlProfilerTimelineModel::announceFeatures(quint64 features)
{
m_modelManager->announceFeatures(modelId(), features);
m_modelManager->announceFeatures(
features, [this](const QmlEvent &event, const QmlEventType &type) {
loadEvent(event, type);
}, [this]() {
finalize();
});
}
void QmlProfilerTimelineModel::dataChanged()