QmlProfiler: Remove references to QmlProfilerDataModel

We keep it private to QmlProfilerModelManager and proxy the last few
methods that were directly called on the model. This enables us to
remove the QmlProfilerDataModel class by integrating what is left of it
into QmlProfilerModelManagerPrivate in a next step.

Change-Id: Ie9b4e03fb286e5a0040374d00b7b26f810426278
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2016-12-29 14:26:29 +01:00
parent 2b75df2139
commit 78daf47a25
24 changed files with 62 additions and 54 deletions

View File

@@ -192,11 +192,6 @@ QmlProfilerTraceTime *QmlProfilerModelManager::traceTime() const
return d->traceTime;
}
QmlProfilerDataModel *QmlProfilerModelManager::qmlModel() const
{
return d->model;
}
QmlProfilerNotesModel *QmlProfilerModelManager::notesModel() const
{
return d->notesModel;
@@ -278,6 +273,17 @@ void QmlProfilerModelManager::addEventType(const QmlEventType &type)
}
}
const QVector<QmlEventType> &QmlProfilerModelManager::eventTypes() const
{
return d->model->eventTypes();
}
bool QmlProfilerModelManager::replayEvents(qint64 startTime, qint64 endTime,
EventLoader loader) const
{
return d->model->replayEvents(startTime, endTime, loader);
}
void QmlProfilerModelManager::QmlProfilerModelManagerPrivate::dispatch(const QmlEvent &event,
const QmlEventType &type)
{
@@ -375,6 +381,16 @@ void QmlProfilerModelManager::processingDone()
setState(Done);
}
void QmlProfilerModelManager::populateFileFinder(const ProjectExplorer::RunConfiguration *runConfiguration)
{
d->model->populateFileFinder(runConfiguration);
}
QString QmlProfilerModelManager::findLocalFile(const QString &remoteFile)
{
return d->model->findLocalFile(remoteFile);
}
void QmlProfilerModelManager::save(const QString &filename)
{
QFile *file = new QFile(filename);
@@ -390,7 +406,7 @@ void QmlProfilerModelManager::save(const QString &filename)
QmlProfilerFileWriter *writer = new QmlProfilerFileWriter(this);
writer->setTraceTime(traceTime()->startTime(), traceTime()->endTime(),
traceTime()->duration());
writer->setData(d->model);
writer->setData(this);
writer->setNotes(d->notesModel->notes());
connect(writer, &QObject::destroyed, this, &QmlProfilerModelManager::saveFinished,