summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-30 13:32:29 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-31 07:13:56 +0000
commitcb70c38ca2ceb370e191fc5510c8faa59ed0007e (patch)
tree6c1464b968c40dc4afc0e39c9c0027ac06d97fd7
parent7a681963284b5600bfb7f81ffdebde7020f86360 (diff)
downloadqt-creator-cb70c38ca2ceb370e191fc5510c8faa59ed0007e.tar.gz
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 <christian.kandeler@qt.io>
-rw-r--r--src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp9
-rw-r--r--src/plugins/qmlprofiler/qmlprofilermodelmanager.h2
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;