From 5e66f834e3a0ded8f6124f7b04aedbaf846cabd6 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 29 May 2018 18:04:07 +0200 Subject: QmlProfiler: Keep text marks when replaying events The text marks are conceptually part of the type storage, not the event storage. We need to hide them on initialize and show them again on finalize, though, so that they get updated. Task-number: QTCREATORBUG-20506 Change-Id: I5fe50110b99ea81b9a7585758a30fcad98bfcaa3 Reviewed-by: Christian Kandeler --- src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp') diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index 824ac1540c..3940710e5a 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -202,12 +202,24 @@ void QmlProfilerModelManager::replayQmlEvents(QmlEventLoader loader, } } +void QmlProfilerModelManager::initialize() +{ + d->textMarkModel->hideTextMarks(); + TimelineTraceManager::initialize(); +} + void QmlProfilerModelManager::clearEventStorage() { TimelineTraceManager::clearEventStorage(); emit traceChanged(); } +void QmlProfilerModelManager::clearTypeStorage() +{ + d->textMarkModel->clear(); + TimelineTraceManager::clearTypeStorage(); +} + static QString getDisplayName(const QmlEventType &event) { if (event.location().filename().isEmpty()) { @@ -261,6 +273,7 @@ void QmlProfilerModelManager::finalize() // which happens on stateChanged(Done). TimelineTraceManager::finalize(); + d->textMarkModel->showTextMarks(); emit traceChanged(); } -- cgit v1.2.3