forked from qt-creator/qt-creator
QmlProfiler: avoid reference to connection in UI
The reference to the "connection" instance can become a dangling pointer. Change-Id: Icde6fed39d19f35420904f718d12931d297d1511 Reviewed-on: http://codereview.qt.nokia.com/1934 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -173,6 +173,7 @@ Rectangle {
|
|||||||
property real elapsedTime;
|
property real elapsedTime;
|
||||||
signal updateTimer;
|
signal updateTimer;
|
||||||
Timer {
|
Timer {
|
||||||
|
id: elapsedTimer
|
||||||
property date startDate
|
property date startDate
|
||||||
property bool reset: true
|
property bool reset: true
|
||||||
running: connection.recording
|
running: connection.recording
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Rectangle {
|
|||||||
states: [
|
states: [
|
||||||
// no data available
|
// no data available
|
||||||
State {
|
State {
|
||||||
when: (root.eventCount == 0) && !connection.recording;
|
when: (root.eventCount == 0) && !elapsedTimer.running;
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: statusDisplay
|
target: statusDisplay
|
||||||
visible: true
|
visible: true
|
||||||
@@ -71,7 +71,7 @@ Rectangle {
|
|||||||
},
|
},
|
||||||
// running app
|
// running app
|
||||||
State {
|
State {
|
||||||
when: connection.recording;
|
when: elapsedTimer.running;
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: statusDisplay
|
target: statusDisplay
|
||||||
visible: true
|
visible: true
|
||||||
|
|||||||
Reference in New Issue
Block a user