forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user