QmlProfiler: Switch recording button only on "Complete"

We can rely on Qt to send a completion message nowadays and keeping
the recording button active enables us to stream events without UI
glitches.

Change-Id: If897413e5224b359042235e4653fc2a35b0b92e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-07-28 12:53:51 +02:00
parent edad1ba516
commit 3b0059efba

View File

@@ -255,6 +255,7 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
}
case Complete:
emit complete(d->maximumTime);
setRecordingFromServer(false);
break;
case SceneGraphFrame: {
if (!d->updateFeatures(ProfileSceneGraph))
@@ -380,8 +381,4 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
default:
break;
}
// stop with the first data
if (messageType != Event || subtype != StartTrace)
setRecordingFromServer(false);
}