From 67e8983443859802372d0b30219bab967a44501a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 9 Oct 2019 09:46:21 +0200 Subject: Fix interactive mode of qmlprofiler Use the correct commands for toggling the recording status and flushing. Also don't clear the event types when clearing the profiler data after a flush, as those remain valid and are needed for processing in the future. Change-Id: I5a3cd5aa33e43a3e81c53cbbaa0c5b8fb407c5bb Fixes: QTBUG-78044 Reviewed-by: Ulf Hermann (cherry picked from commit da4069a96b97acb180023eae4ee5f2096613e51f) --- tools/qmlprofiler/qmlprofilerapplication.cpp | 4 ++-- tools/qmlprofiler/qmlprofilerdata.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index 6732766b46..13a0021051 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -303,7 +303,7 @@ void QmlProfilerApplication::flush() { if (m_recording) { m_pendingRequest = REQUEST_FLUSH; - m_qmlProfilerClient->sendRecordingStatus(false); + m_qmlProfilerClient->setRecording(false); } else { if (m_profilerData->save(m_interactiveOutputFile)) { m_profilerData->clear(); @@ -393,7 +393,7 @@ void QmlProfilerApplication::userCommand(const QString &command) if (cmd == Constants::CMD_RECORD || cmd == Constants::CMD_RECORD2) { m_pendingRequest = REQUEST_TOGGLE_RECORDING; - m_qmlProfilerClient->sendRecordingStatus(!m_recording); + m_qmlProfilerClient->setRecording(!m_recording); } else if (cmd == Constants::CMD_QUIT || cmd == Constants::CMD_QUIT2) { m_pendingRequest = REQUEST_QUIT; if (m_recording) { diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp index d5662a0182..9ec143975e 100644 --- a/tools/qmlprofiler/qmlprofilerdata.cpp +++ b/tools/qmlprofiler/qmlprofilerdata.cpp @@ -101,7 +101,6 @@ QmlProfilerData::~QmlProfilerData() void QmlProfilerData::clear() { - d->eventTypes.clear(); d->events.clear(); d->traceEndTime = std::numeric_limits::min(); -- cgit v1.2.3