From cb70c38ca2ceb370e191fc5510c8faa59ed0007e Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 30 May 2018 13:32:29 +0200 Subject: QmlProfiler: Actually update the details when rewriter tells us to Before, only the signal was sent. While we're at it, also disambiguate the method and signal names. Change-Id: Iafce9b06841d7faedfefdb0638d0fa1f60c061c1 Task-number: QTCREATORBUG-20500 Reviewed-by: Christian Kandeler --- src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp | 9 +++++---- src/plugins/qmlprofiler/qmlprofilermodelmanager.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index 3940710e5a..55a2cfea4b 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -123,7 +123,7 @@ QmlProfilerModelManager::QmlProfilerModelManager(QObject *parent) : d->detailsRewriter = new Internal::QmlProfilerDetailsRewriter(this); connect(d->detailsRewriter, &Internal::QmlProfilerDetailsRewriter::rewriteDetailsString, - this, &QmlProfilerModelManager::typeDetailsChanged); + this, &QmlProfilerModelManager::setTypeDetails); connect(d->detailsRewriter, &Internal::QmlProfilerDetailsRewriter::eventDetailsChanged, this, &QmlProfilerModelManager::typeDetailsFinished); @@ -287,12 +287,13 @@ QString QmlProfilerModelManager::findLocalFile(const QString &remoteFile) return d->detailsRewriter->getLocalFile(remoteFile); } -void QmlProfilerModelManager::detailsChanged(int typeId, const QString &newString) +void QmlProfilerModelManager::setTypeDetails(int typeId, const QString &details) { QTC_ASSERT(typeId < numEventTypes(), return); QmlEventType type = eventType(typeId); - type.setData(newString); - setEventType(typeId, std::move(type)); + type.setData(details); + // Don't rewrite the details again, but directly push the type into the type storage. + Timeline::TimelineTraceManager::setEventType(typeId, std::move(type)); emit typeDetailsChanged(typeId); } diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h index 6d73a08d51..3dd38c66e2 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.h +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.h @@ -89,7 +89,7 @@ signals: void typeDetailsFinished(); private: - void detailsChanged(int typeId, const QString &newString); + void setTypeDetails(int typeId, const QString &details); void restrictByFilter(QmlEventFilter filter); void clearEventStorage() final; -- cgit v1.2.1