forked from qt-creator/qt-creator
QmlProfiler: Don't access QmlProfilerTool from QmlProfilerTextMark
Only QmlProfilerViewManager is needed, so use that, as a step to reduce the interface of the QmlProfilerTool singleton. Change-Id: I19e55e3b22b3c64ff98b8ea29cbc5164a60ee15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -290,7 +290,7 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent)
|
||||
connect(editorManager, &EditorManager::editorCreated,
|
||||
model, [this, model](Core::IEditor *editor, const QString &fileName) {
|
||||
Q_UNUSED(editor);
|
||||
model->createMarks(this, fileName);
|
||||
model->createMarks(d->m_viewContainer, fileName);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -437,11 +437,6 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber,
|
||||
EditorManager::DoNotSwitchToDesignMode | EditorManager::DoNotSwitchToEditMode);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::selectType(int typeId)
|
||||
{
|
||||
d->m_viewContainer->typeSelected(typeId);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::updateTimeDisplay()
|
||||
{
|
||||
double seconds = 0;
|
||||
@@ -500,7 +495,7 @@ void QmlProfilerTool::createTextMarks()
|
||||
{
|
||||
QmlProfilerTextMarkModel *model = d->m_profilerModelManager->textMarkModel();
|
||||
foreach (IDocument *document, DocumentModel::openedDocuments())
|
||||
model->createMarks(this, document->filePath().toString());
|
||||
model->createMarks(d->m_viewContainer, document->filePath().toString());
|
||||
}
|
||||
|
||||
void QmlProfilerTool::clearTextMarks()
|
||||
@@ -569,16 +564,6 @@ void QmlProfilerTool::attachToWaitingApplication()
|
||||
ProjectExplorerPlugin::startRunControl(runControl);
|
||||
}
|
||||
|
||||
QString QmlProfilerTool::summary(const QVector<int> &typeIds) const
|
||||
{
|
||||
return d->m_viewContainer->statisticsView()->summary(typeIds);
|
||||
}
|
||||
|
||||
QStringList QmlProfilerTool::details(int typeId) const
|
||||
{
|
||||
return d->m_viewContainer->statisticsView()->details(typeId);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::logState(const QString &msg)
|
||||
{
|
||||
MessageManager::write(msg, MessageManager::Flash);
|
||||
|
Reference in New Issue
Block a user