QmlProfiler: Don't process all events twice when loading traces

At the end of QmlProfilerFileReader::load() we have a perfectly valid
set of types and events which we can just pass on to the model as-is.

Change-Id: I6981663f409c4647f4d5ae8a73b5d14cc701017b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-08-12 13:39:22 +02:00
parent ce49f92cb7
commit 9ca42dacf3
5 changed files with 23 additions and 37 deletions

View File

@@ -367,15 +367,10 @@ void QmlProfilerModelManager::load()
QmlProfilerFileReader reader;
connect(&reader, SIGNAL(error(QString)), this, SIGNAL(error(QString)));
connect(&reader, SIGNAL(rangedEvent(QmlDebug::Message,QmlDebug::RangeType,int,qint64,qint64,
QString,QmlDebug::QmlEventLocation,
qint64, qint64, qint64, qint64, qint64)),
this, SLOT(addQmlEvent(QmlDebug::Message,QmlDebug::RangeType,int,qint64,qint64,
QString,QmlDebug::QmlEventLocation,
qint64, qint64, qint64, qint64, qint64)));
connect(&reader, SIGNAL(traceStartTime(qint64)), traceTime(), SLOT(setStartTime(qint64)));
connect(&reader, SIGNAL(traceEndTime(qint64)), traceTime(), SLOT(setEndTime(qint64)));
reader.setV8DataModel(d->v8Model);
reader.setQmlDataModel(d->model);
reader.load(&file);
complete();