QmlProfiler: Get rid of processing step

The child models are made aware of possible changes in the details
strings, and in turn, we can do the finalization immediately after
acquiring is done.

Change-Id: Ibe57f158e64e5d01d4c97aa617c9b2bcc8e4e96e
Task-number: QTCREATORBUG-20106
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2018-03-27 15:58:43 +02:00
parent 72e0a6fec5
commit 1ccd058bdf
22 changed files with 98 additions and 51 deletions

View File

@@ -53,6 +53,8 @@ FlameGraphModel::FlameGraphModel(QmlProfilerModelManager *modelManager,
m_compileStackTop = &m_stackBottom;
connect(modelManager, &QmlProfilerModelManager::stateChanged,
this, &FlameGraphModel::onModelManagerStateChanged);
connect(modelManager, &QmlProfilerModelManager::typeDetailsFinished,
this, &FlameGraphModel::onTypeDetailsFinished);
connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed,
this, [this](int typeId, int, int){loadNotes(typeId, true);});
m_modelId = modelManager->registerModelProxy();
@@ -157,6 +159,11 @@ void FlameGraphModel::onModelManagerStateChanged()
clear();
}
void FlameGraphModel::onTypeDetailsFinished()
{
emit dataChanged(QModelIndex(), QModelIndex(), QVector<int>(1, DetailsRole));
}
void FlameGraphModel::restrictToFeatures(quint64 visibleFeatures)
{
visibleFeatures = visibleFeatures & supportedFeatures();