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:
Christiaan Janssen
2011-07-21 11:24:49 +02:00
parent ed678f8726
commit ef58d3e40b
2 changed files with 3 additions and 2 deletions

View File

@@ -173,6 +173,7 @@ Rectangle {
property real elapsedTime;
signal updateTimer;
Timer {
id: elapsedTimer
property date startDate
property bool reset: true
running: connection.recording

View File

@@ -58,7 +58,7 @@ Rectangle {
states: [
// no data available
State {
when: (root.eventCount == 0) && !connection.recording;
when: (root.eventCount == 0) && !elapsedTimer.running;
PropertyChanges {
target: statusDisplay
visible: true
@@ -71,7 +71,7 @@ Rectangle {
},
// running app
State {
when: connection.recording;
when: elapsedTimer.running;
PropertyChanges {
target: statusDisplay
visible: true