forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user