forked from qt-creator/qt-creator
QmlProfiler: Don't let timer run if we cannot connect to port
Previously the timer was started as soon as we connect, but we should actually make sure the service is there. Change-Id: Ic59ccb4a402a54dc1fc1f0c92ca2f80dad436581 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
committed by
Christiaan Janssen
parent
3ba511c6ad
commit
e249265a96
@@ -88,6 +88,11 @@ void QmlProfilerTraceClient::clearData()
|
|||||||
emit cleared();
|
emit cleared();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QmlProfilerTraceClient::isEnabled() const
|
||||||
|
{
|
||||||
|
return status() == Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
bool QmlProfilerTraceClient::isRecording() const
|
bool QmlProfilerTraceClient::isRecording() const
|
||||||
{
|
{
|
||||||
return d->recording;
|
return d->recording;
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ struct QMLJSDEBUGCLIENT_EXPORT Location
|
|||||||
class QMLJSDEBUGCLIENT_EXPORT QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient
|
class QMLJSDEBUGCLIENT_EXPORT QmlProfilerTraceClient : public QmlJsDebugClient::QDeclarativeDebugClient
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(bool enabled READ isEnabled NOTIFY enabled)
|
||||||
Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged)
|
Q_PROPERTY(bool recording READ isRecording WRITE setRecording NOTIFY recordingChanged)
|
||||||
|
|
||||||
// don't hide by signal
|
// don't hide by signal
|
||||||
@@ -84,6 +85,7 @@ public:
|
|||||||
MaximumMessage
|
MaximumMessage
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool isEnabled() const;
|
||||||
bool isRecording() const;
|
bool isRecording() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ Rectangle {
|
|||||||
id: elapsedTimer
|
id: elapsedTimer
|
||||||
property date startDate
|
property date startDate
|
||||||
property bool reset: true
|
property bool reset: true
|
||||||
running: connection.recording
|
running: connection.recording && connection.enabled
|
||||||
repeat: true
|
repeat: true
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
if (running) reset = true;
|
if (running) reset = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user