summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-11-14 14:34:36 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-11-14 15:46:10 +0000
commitaaab74e276d5efec03fe86db8604c43a1cb8b17c (patch)
treef5b6d4397ccd4f24f6e89102a6789fd46c117ff8
parentfed9ac43f058db9b242f6cde5d28acab92c3ba88 (diff)
downloadqt-creator-aaab74e276d5efec03fe86db8604c43a1cb8b17c.tar.gz
Tracing: Don't use "row" and "column" as IDs
Fixes: QTCREATORBUG-21478 Change-Id: I9bda68abc4980ab9bc4247e48f5bc8bfc788c2dd Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/libs/tracing/qml/CategoryLabel.qml8
-rw-r--r--src/libs/tracing/qml/Overview.qml8
-rw-r--r--src/libs/tracing/qml/TimeDisplay.qml14
-rw-r--r--src/libs/tracing/qml/TimeMarks.qml18
4 files changed, 25 insertions, 23 deletions
diff --git a/src/libs/tracing/qml/CategoryLabel.qml b/src/libs/tracing/qml/CategoryLabel.qml
index e6dd396547..5945b0f6df 100644
--- a/src/libs/tracing/qml/CategoryLabel.qml
+++ b/src/libs/tracing/qml/CategoryLabel.qml
@@ -96,7 +96,7 @@ Item {
}
Column {
- id: column
+ id: labelsArea
property QtObject parentModel: model
anchors.top: txt.bottom
visible: expanded
@@ -111,7 +111,7 @@ Item {
: draggerParent.contentHeight
active: contentBottom > offset
width: labelContainer.width
- height: column.parentModel ? column.parentModel.rowHeight(index + 1) : 0
+ height: labelsArea.parentModel ? labelsArea.parentModel.rowHeight(index + 1) : 0
sourceComponent: RowLabel {
label: labels[index];
@@ -123,8 +123,8 @@ Item {
}
}
onSetRowHeight: {
- column.parentModel.setExpandedRowHeight(index + 1, newHeight);
- loader.height = column.parentModel.rowHeight(index + 1);
+ labelsArea.parentModel.setExpandedRowHeight(index + 1, newHeight);
+ loader.height = labelsArea.parentModel.rowHeight(index + 1);
}
}
}
diff --git a/src/libs/tracing/qml/Overview.qml b/src/libs/tracing/qml/Overview.qml
index feda483bbb..e560285802 100644
--- a/src/libs/tracing/qml/Overview.qml
+++ b/src/libs/tracing/qml/Overview.qml
@@ -95,7 +95,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
- id: column
+ id: renderArea
Repeater {
model: modelProxy.models
@@ -103,8 +103,8 @@ Rectangle {
model: modelData
zoomer: overview.zoomer
notes: modelProxy.notes
- width: column.width
- height: column.height / modelProxy.models.length
+ width: renderArea.width
+ height: renderArea.height / modelProxy.models.length
}
}
}
@@ -116,7 +116,7 @@ Rectangle {
return prev;
}, {});
- property int vertSpace: column.height / 7
+ property int vertSpace: renderArea.height / 7
property color noteColor: Theme.color(Theme.Timeline_HighlightColor)
readonly property double spacing: parent.width / zoomer.traceDuration
diff --git a/src/libs/tracing/qml/TimeDisplay.qml b/src/libs/tracing/qml/TimeDisplay.qml
index 06ed0d9275..6bca32590f 100644
--- a/src/libs/tracing/qml/TimeDisplay.qml
+++ b/src/libs/tracing/qml/TimeDisplay.qml
@@ -60,7 +60,7 @@ Item {
Item {
x: -(timeDisplay.offsetX % timeDisplay.pixelsPerBlock)
y: 0
- id: row
+ id: timeDisplayArea
property int firstBlock: timeDisplay.offsetX / timeDisplay.pixelsPerBlock
property int offset: repeater.model > 0 ? repeater.model - (firstBlock % repeater.model) : 0;
@@ -71,18 +71,18 @@ Item {
+ 2))
Item {
- id: column
+ id: timeDisplayItem
// Changing the text in text nodes is expensive. We minimize the number of changes
// by rotating the nodes during scrolling.
- property int stableIndex: (index + row.offset) % repeater.model
+ property int stableIndex: (index + timeDisplayArea.offset) % repeater.model
height: timeDisplay.height
y: 0
x: width * stableIndex
width: timeDisplay.pixelsPerBlock
- property double blockStartTime: (row.firstBlock + stableIndex)
+ property double blockStartTime: (timeDisplayArea.firstBlock + stableIndex)
* timeDisplay.timePerBlock
+ timeDisplay.alignedWindowStart
@@ -97,7 +97,8 @@ Item {
font.pixelSize: timeDisplay.fontSize
anchors.rightMargin: timeDisplay.textMargin
verticalAlignment: Text.AlignVCenter
- text: TimeFormatter.format(column.blockStartTime, timeDisplay.rangeDuration)
+ text: TimeFormatter.format(timeDisplayItem.blockStartTime,
+ timeDisplay.rangeDuration)
visible: width > 0
color: Theme.color(Theme.PanelTextColorLight)
elide: Text.ElideLeft
@@ -117,7 +118,8 @@ Item {
width: timeDisplay.pixelsPerSection
Rectangle {
- visible: column.stableIndex !== 0 || (-row.x < parent.x + x)
+ visible: timeDisplayItem.stableIndex !== 0
+ || (-timeDisplayArea.x < parent.x + x)
color: Theme.color(Theme.Timeline_DividerColor)
width: 1
anchors.top: parent.top
diff --git a/src/libs/tracing/qml/TimeMarks.qml b/src/libs/tracing/qml/TimeMarks.qml
index fc3d9e3c90..a3622b06d2 100644
--- a/src/libs/tracing/qml/TimeMarks.qml
+++ b/src/libs/tracing/qml/TimeMarks.qml
@@ -78,19 +78,19 @@ Item {
Column {
- id: rows
+ id: scaleArea
anchors.left: parent.left
anchors.right: parent.right
Repeater {
id: rowRepeater
model: timeMarks.rowCount
Rectangle {
- id: row
+ id: scaleItem
color: ((index + (startOdd ? 1 : 0)) % 2)
? Theme.color(Theme.Timeline_BackgroundColor1)
: Theme.color(Theme.Timeline_BackgroundColor2)
- anchors.left: rows.left
- anchors.right: rows.right
+ anchors.left: scaleArea.left
+ anchors.right: scaleArea.right
height: timeMarks.model ? timeMarks.model.rowHeight(index) : 0
property double minVal: timeMarks.model ? timeMarks.model.rowMinValue(index) : 0
@@ -123,17 +123,17 @@ Item {
anchors.leftMargin: 2
anchors.topMargin: 2
anchors.left: parent.left
- text: prettyPrintScale(row.maxVal)
+ text: prettyPrintScale(scaleItem.maxVal)
}
Repeater {
- model: row.valDiff / row.stepVal
+ model: scaleItem.valDiff / scaleItem.stepVal
Item {
anchors.left: scaleParent.left
anchors.right: scaleParent.right
- height: row.stepVal * row.height / row.valDiff
- y: row.height - (index + 1) * height
+ height: scaleItem.stepVal * scaleItem.height / scaleItem.valDiff
+ y: scaleItem.height - (index + 1) * height
visible: y > scaleTopLabel.height
TimelineText {
font.pixelSize: 8
@@ -141,7 +141,7 @@ Item {
anchors.bottomMargin: 2
anchors.leftMargin: 2
anchors.left: parent.left
- text: prettyPrintScale(row.minVal + index * row.stepVal)
+ text: prettyPrintScale(scaleItem.minVal + index * scaleItem.stepVal)
}
Rectangle {