aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-29 18:04:07 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-30 07:49:38 +0000
commit5e66f834e3a0ded8f6124f7b04aedbaf846cabd6 (patch)
tree5062e78ba5f41828c0858bb4ff097053648bf181 /src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp
parentfe09fc239c7a12b5bb7f929ec6ed24b6aab89669 (diff)
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 <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp13
1 files changed, 13 insertions, 0 deletions
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();
}