forked from qt-creator/qt-creator
QmlProfiler: Properly clear the trace client
Rename the method to clear() and make sure all the event types and pending events are actually cleared. Change-Id: Ie6c916d374a00025f7d77d21345d039fe8cead80 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -60,7 +60,7 @@ void QmlProfilerClientManager::setFlushInterval(quint32 flushInterval)
|
|||||||
void QmlProfilerClientManager::clearBufferedData()
|
void QmlProfilerClientManager::clearBufferedData()
|
||||||
{
|
{
|
||||||
if (m_clientPlugin)
|
if (m_clientPlugin)
|
||||||
m_clientPlugin->clearData();
|
m_clientPlugin->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerClientManager::stopRecording()
|
void QmlProfilerClientManager::stopRecording()
|
||||||
|
@@ -198,10 +198,12 @@ QmlProfilerTraceClient::~QmlProfilerTraceClient()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTraceClient::clearData()
|
void QmlProfilerTraceClient::clear()
|
||||||
{
|
{
|
||||||
|
d->serverTypeIds.clear();
|
||||||
d->eventTypeIds.clear();
|
d->eventTypeIds.clear();
|
||||||
d->rangesInProgress.clear();
|
d->rangesInProgress.clear();
|
||||||
|
d->pendingMessages.clear();
|
||||||
if (d->recordedFeatures != 0) {
|
if (d->recordedFeatures != 0) {
|
||||||
d->recordedFeatures = 0;
|
d->recordedFeatures = 0;
|
||||||
emit recordedFeaturesChanged(0);
|
emit recordedFeaturesChanged(0);
|
||||||
|
@@ -55,7 +55,7 @@ public:
|
|||||||
virtual void messageReceived(const QByteArray &) override;
|
virtual void messageReceived(const QByteArray &) override;
|
||||||
virtual void stateChanged(State status) override;
|
virtual void stateChanged(State status) override;
|
||||||
|
|
||||||
void clearData();
|
void clear();
|
||||||
void sendRecordingStatus(int engineId = -1);
|
void sendRecordingStatus(int engineId = -1);
|
||||||
void setRequestedFeatures(quint64 features);
|
void setRequestedFeatures(quint64 features);
|
||||||
void setFlushInterval(quint32 flushInterval);
|
void setFlushInterval(quint32 flushInterval);
|
||||||
|
Reference in New Issue
Block a user