forked from qt-creator/qt-creator
QmlProfiler: Retain event types between sessions on same connection
The server won't re-send the event types. We need to keep them until the connection goes away. Otherwise we get invalid event types and soft asserts when trying to look up event types for new events. Also, when clearing the event types, also clear the server type IDs. Not clearing those constitutes a memory leak. Change-Id: I564b0c4cf0ed754549d2b8ede63c97fa01affcec Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -213,9 +213,8 @@ QmlProfilerTraceClient::~QmlProfilerTraceClient()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void QmlProfilerTraceClient::clearData()
|
||||
void QmlProfilerTraceClient::clearEvents()
|
||||
{
|
||||
d->eventTypeIds.clear();
|
||||
d->rangesInProgress.clear();
|
||||
d->pendingDebugMessages.clear();
|
||||
if (d->recordedFeatures != 0) {
|
||||
@@ -225,6 +224,13 @@ void QmlProfilerTraceClient::clearData()
|
||||
emit cleared();
|
||||
}
|
||||
|
||||
void QmlProfilerTraceClient::clearData()
|
||||
{
|
||||
d->eventTypeIds.clear();
|
||||
d->serverTypeIds.clear();
|
||||
clearEvents();
|
||||
}
|
||||
|
||||
void QmlProfilerTraceClient::sendRecordingStatus(int engineId)
|
||||
{
|
||||
d->sendRecordingStatus(engineId);
|
||||
|
||||
Reference in New Issue
Block a user