Commit a46fe36b authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Fix toggling of internal client recording state

We cannot just set it unconditionally on setRecording() because the
client recording state is supposed to reflect the user's intention.
Instead, if the recording button's state differs from the intention
and then spontaneously changes to match it (through a change in the
application), we toggle the client recording state twice to make sure
everything is properly synchronized.

Change-Id: I070d38364e63ab9cf0597fabed3d326ac3685589
Task-number: QTCREATORBUG-13322, QTCREATORBUG-13430
Reviewed-by: default avatarKai Koehne <>
parent 9411cd2d
......@@ -328,14 +328,21 @@ void QmlProfilerTool::populateFileFinder(QString projectDirectory, QString activ
void QmlProfilerTool::recordingButtonChanged(bool recording)
// clientRecording is our intention for new sessions. That may differ from the state of the
// current session, as indicated by the button. To synchronize it, toggle once.
if (recording && d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
if (checkForUnsavedNotes()) {
clearData(); // clear right away, before the application starts
if (d->m_profilerState->clientRecording())
} else {
} else {
if (d->m_profilerState->clientRecording() == recording)
......@@ -348,7 +355,6 @@ void QmlProfilerTool::setRecording(bool recording)
// manage timer
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment