forked from qt-creator/qt-creator
QmlProfiler: Show profiling data initiated by console APIs
The profile clients now also listens to profiling data sent by console APIs console.profile and console.profileEnd Change-Id: I7f7100448263889076e94a1e251b8977ce047843 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -79,6 +79,10 @@ QmlProfilerTraceClient::QmlProfilerTraceClient(QDeclarativeDebugConnection *clie
|
||||
|
||||
QmlProfilerTraceClient::~QmlProfilerTraceClient()
|
||||
{
|
||||
//Disable profiling if started by client
|
||||
//Profiling data will be lost!!
|
||||
if (isRecording())
|
||||
setRecording(false);
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -88,6 +92,11 @@ void QmlProfilerTraceClient::clearData()
|
||||
emit cleared();
|
||||
}
|
||||
|
||||
void QmlProfilerTraceClient::sendRecordingStatus()
|
||||
{
|
||||
d->sendRecordingStatus();
|
||||
}
|
||||
|
||||
bool QmlProfilerTraceClient::isEnabled() const
|
||||
{
|
||||
return status() == Enabled;
|
||||
@@ -106,17 +115,14 @@ void QmlProfilerTraceClient::setRecording(bool v)
|
||||
d->recording = v;
|
||||
|
||||
if (status() == Enabled) {
|
||||
d->sendRecordingStatus();
|
||||
sendRecordingStatus();
|
||||
}
|
||||
|
||||
emit recordingChanged(v);
|
||||
}
|
||||
|
||||
void QmlProfilerTraceClient::statusChanged(Status status)
|
||||
void QmlProfilerTraceClient::statusChanged(Status /*status*/)
|
||||
{
|
||||
if (status == Enabled) {
|
||||
d->sendRecordingStatus();
|
||||
}
|
||||
emit enabledChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user