forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user