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:
@@ -77,6 +77,10 @@ QV8ProfilerClient::QV8ProfilerClient(QDeclarativeDebugConnection *client)
|
||||
|
||||
QV8ProfilerClient::~QV8ProfilerClient()
|
||||
{
|
||||
//Disable profiling if started by client
|
||||
//Profiling data will be lost!!
|
||||
if (isRecording())
|
||||
setRecording(false);
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -90,6 +94,11 @@ bool QV8ProfilerClient::isEnabled() const
|
||||
return status() == Enabled;
|
||||
}
|
||||
|
||||
void QV8ProfilerClient::sendRecordingStatus()
|
||||
{
|
||||
d->sendRecordingStatus();
|
||||
}
|
||||
|
||||
bool QV8ProfilerClient::isRecording() const
|
||||
{
|
||||
return d->recording;
|
||||
@@ -103,17 +112,14 @@ void QV8ProfilerClient::setRecording(bool v)
|
||||
d->recording = v;
|
||||
|
||||
if (status() == Enabled) {
|
||||
d->sendRecordingStatus();
|
||||
sendRecordingStatus();
|
||||
}
|
||||
|
||||
emit recordingChanged(v);
|
||||
}
|
||||
|
||||
void QV8ProfilerClient::statusChanged(Status status)
|
||||
void QV8ProfilerClient::statusChanged(Status /*status*/)
|
||||
{
|
||||
if (status == Enabled) {
|
||||
d->sendRecordingStatus();
|
||||
}
|
||||
emit enabledChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user