diff --git a/src/plugins/qmlprofiler/flamegraphmodel.cpp b/src/plugins/qmlprofiler/flamegraphmodel.cpp index d8a3315576b..702bbedd826 100644 --- a/src/plugins/qmlprofiler/flamegraphmodel.cpp +++ b/src/plugins/qmlprofiler/flamegraphmodel.cpp @@ -165,12 +165,12 @@ void FlameGraphModel::restrictToFeatures(quint64 visibleFeatures) clear(); QFutureInterface future; - m_modelManager->replayEvents(m_modelManager->traceStart(), m_modelManager->traceEnd(), - std::bind(&FlameGraphModel::loadEvent, this, - std::placeholders::_1, std::placeholders::_2), - std::bind(&FlameGraphModel::beginResetModel, this), - std::bind(&FlameGraphModel::finalize, this), - [this](const QString &message) { + m_modelManager->replayQmlEvents(m_modelManager->traceStart(), m_modelManager->traceEnd(), + std::bind(&FlameGraphModel::loadEvent, this, + std::placeholders::_1, std::placeholders::_2), + std::bind(&FlameGraphModel::beginResetModel, this), + std::bind(&FlameGraphModel::finalize, this), + [this](const QString &message) { emit m_modelManager->error(tr("Could not re-read events from temporary trace file: %1") .arg(message)); endResetModel(); diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index f60e843b403..849dd709601 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -149,8 +149,8 @@ void QmlProfilerModelManager::replayEvents(qint64 rangeStart, qint64 rangeEnd, Finalizer finalizer, ErrorHandler errorHandler, QFutureInterface &future) const { - replayEvents(rangeStart, rangeEnd, static_cast(loader), initializer, finalizer, - errorHandler, future); + replayQmlEvents(rangeStart, rangeEnd, static_cast(loader), initializer, + finalizer, errorHandler, future); } static bool isStateful(const QmlEventType &type) @@ -162,10 +162,10 @@ static bool isStateful(const QmlEventType &type) return message == PixmapCacheEvent || message == MemoryAllocation; } -void QmlProfilerModelManager::replayEvents(qint64 rangeStart, qint64 rangeEnd, - QmlEventLoader loader, Initializer initializer, - Finalizer finalizer, ErrorHandler errorHandler, - QFutureInterface &future) const +void QmlProfilerModelManager::replayQmlEvents(qint64 rangeStart, qint64 rangeEnd, + QmlEventLoader loader, Initializer initializer, + Finalizer finalizer, ErrorHandler errorHandler, + QFutureInterface &future) const { if (initializer) initializer(); diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h index bfa2a04f896..c0bac3acf51 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h @@ -64,9 +64,9 @@ public: void addEventTypes(const QVector &types); const QmlEventType &eventType(int typeId) const; - void replayEvents(qint64 rangeStart, qint64 rangeEnd, QmlEventLoader loader, - Initializer initializer, Finalizer finalizer, - ErrorHandler errorHandler, QFutureInterface &future) const; + void replayQmlEvents(qint64 rangeStart, qint64 rangeEnd, QmlEventLoader loader, + Initializer initializer, Finalizer finalizer, + ErrorHandler errorHandler, QFutureInterface &future) const; void finalize() override; diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp index 56f0920fac4..bb41405809d 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp @@ -101,11 +101,11 @@ void QmlProfilerStatisticsModel::restrictToFeatures(quint64 features) clear(); QFutureInterface future; - m_modelManager->replayEvents(m_modelManager->traceStart(), m_modelManager->traceEnd(), - std::bind(&QmlProfilerStatisticsModel::loadEvent, this, - std::placeholders::_1, std::placeholders::_2), - std::bind(&QmlProfilerStatisticsModel::beginResetModel, this), - [this]() { + m_modelManager->replayQmlEvents(m_modelManager->traceStart(), m_modelManager->traceEnd(), + std::bind(&QmlProfilerStatisticsModel::loadEvent, this, + std::placeholders::_1, std::placeholders::_2), + std::bind(&QmlProfilerStatisticsModel::beginResetModel, this), + [this]() { finalize(); notesChanged(QmlProfilerStatisticsModel::s_invalidTypeId); // Reload notes }, [this](const QString &message) { diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp index 83b70235595..b963eaf59f8 100644 --- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp @@ -712,7 +712,7 @@ void QmlProfilerTraceFile::saveQtd(QIODevice *device) QStack stack; qint64 lastProgressTimestamp = traceStart(); - modelManager()->replayEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { + modelManager()->replayQmlEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { if (type.rangeType() != MaximumRangeType && event.rangeStage() == RangeStart) { stack.push(event); return; @@ -858,7 +858,7 @@ void QmlProfilerTraceFile::saveQzt(QIODevice *device) } qint64 lastProgressTimestamp = traceStart(); - modelManager()->replayEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { + modelManager()->replayQmlEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { Q_UNUSED(type); bufferStream << event; // 32MB buffer should be plenty for efficient compression diff --git a/src/plugins/qmlprofiler/tests/qmlprofilertraceclient_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilertraceclient_test.cpp index 216432f89d3..3642e829b44 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilertraceclient_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilertraceclient_test.cpp @@ -70,7 +70,7 @@ void QmlProfilerTraceClientTest::testMessageReceived() traceClient.stateChanged(QmlDebug::QmlDebugClient::NotConnected); QFutureInterface future; - modelManager.replayEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { + modelManager.replayQmlEvents(-1, -1, [&](const QmlEvent &event, const QmlEventType &type) { qint64 timestamp; qint32 message; qint32 rangeType;