summaryrefslogtreecommitdiffstats
path: root/imports
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-05-30 13:30:02 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-06-10 07:32:07 +0000
commit2870aaa09b86080941d7f44aa8910c73f6ce99c2 (patch)
treed4565fdc550c615846a729b91c96683089057850 /imports
parentc1c66f5b34aa6a4e721ab3e7fcd067777ba5fca7 (diff)
add QmlMessageTrace
A utility to be instantiated in the application-under-test, which will install itself as the message handler, parse the output of the requested logging categories for tracing, and generate a message trace in QML. Change-Id: I3961c27d00ecead5a1204cb2f6928af4f9da26aa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'imports')
-rw-r--r--imports/Diagrams/UmlSequence/Message.qml14
-rw-r--r--imports/Diagrams/UmlSequence/ObjectInstance.qml2
2 files changed, 11 insertions, 5 deletions
diff --git a/imports/Diagrams/UmlSequence/Message.qml b/imports/Diagrams/UmlSequence/Message.qml
index 19d38cf..92b441f 100644
--- a/imports/Diagrams/UmlSequence/Message.qml
+++ b/imports/Diagrams/UmlSequence/Message.qml
@@ -52,8 +52,14 @@ MouseArea {
hoverEnabled: true
z: 1
property bool toSelf: from && from === to
- property bool backwards: from ? from.x > to.x : false
+ property bool backwards: from && to ? from.x > to.x : false
property real timestamp: 0
+ Text {
+ x: -root.x
+ text: root.timestamp
+ color: "darkblue"
+ font.pointSize: 8
+ }
Rectangle {
width: 150
height: 20
@@ -89,10 +95,10 @@ MouseArea {
x: backwards || toSelf ? 0 : parent.width - width
}
ToolTip {
- text: root.methodSignature + "\n" + root.backtrace + "\n\nparams:\n" + root.params
+ text: root.methodSignature + "\n" + root.backtrace + "\n\nparams:\n" + root.params + "\n\ntimestamp: " + root.timestamp
visible: root.containsMouse
}
- anchors.left: backwards ? to.horizontalCenter : from ? from.horizontalCenter : undefined
- anchors.right: backwards ? from.horizontalCenter : toSelf ? undefined : to.horizontalCenter
+ anchors.left: backwards && to ? to.horizontalCenter : from ? from.horizontalCenter : undefined
+ anchors.right: backwards && from ? from.horizontalCenter : toSelf ? undefined : to ? to.horizontalCenter : undefined
}
diff --git a/imports/Diagrams/UmlSequence/ObjectInstance.qml b/imports/Diagrams/UmlSequence/ObjectInstance.qml
index b8dea17..a2b45f3 100644
--- a/imports/Diagrams/UmlSequence/ObjectInstance.qml
+++ b/imports/Diagrams/UmlSequence/ObjectInstance.qml
@@ -96,7 +96,7 @@ Rectangle {
Text {
id: rotatedLabel
color: "darkblue"
- text: objectClassLabel.text
+ text: objectClassLabel.text + " " + objectNameLabel.text
anchors.centerIn: parent
}
}