diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-09 09:46:21 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2020-10-01 16:48:20 +0200 |
commit | 67e8983443859802372d0b30219bab967a44501a (patch) | |
tree | 26733803a770bbcd80702753b8aa6b58e1fe2816 | |
parent | 8721196cc73021709ef13e1a6e74aedd34bcfc79 (diff) |
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 <ulf.hermann@qt.io>
(cherry picked from commit da4069a96b97acb180023eae4ee5f2096613e51f)
-rw-r--r-- | tools/qmlprofiler/qmlprofilerapplication.cpp | 4 | ||||
-rw-r--r-- | 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<qint64>::min(); |