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:
@@ -471,18 +471,13 @@ void QmlProfilerTool::setButtonsEnabled(bool enable)
|
||||
d->m_recordFeaturesMenu->setEnabled(enable);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::createTextMarks()
|
||||
void QmlProfilerTool::createInitialTextMarks()
|
||||
{
|
||||
QmlProfilerTextMarkModel *model = d->m_profilerModelManager->textMarkModel();
|
||||
foreach (IDocument *document, DocumentModel::openedDocuments())
|
||||
model->createMarks(d->m_viewContainer, document->filePath().toString());
|
||||
}
|
||||
|
||||
void QmlProfilerTool::clearTextMarks()
|
||||
{
|
||||
d->m_profilerModelManager->textMarkModel()->clear();
|
||||
}
|
||||
|
||||
bool QmlProfilerTool::prepareTool()
|
||||
{
|
||||
if (d->m_profilerState->clientRecording()) {
|
||||
@@ -757,14 +752,13 @@ void QmlProfilerTool::initialize()
|
||||
void QmlProfilerTool::finalize()
|
||||
{
|
||||
updateTimeDisplay();
|
||||
createTextMarks();
|
||||
createInitialTextMarks();
|
||||
setButtonsEnabled(true);
|
||||
d->m_recordButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::clear()
|
||||
{
|
||||
clearTextMarks();
|
||||
clearDisplay();
|
||||
setButtonsEnabled(true);
|
||||
d->m_recordButton->setEnabled(true);
|
||||
|
Reference in New Issue
Block a user