tst_snippets: move Line inline component out of Page

This causes an alias to break when QML_DISABLE_DISK_CACHE is not set
(the default). Although it probably should work regardless, it doesn't
make sense for the inline component to be in the Page.

Amends d648235777.

Task-number: QTBUG-111857
Pick-to: 6.5 6.5.0
Change-Id: I58d7234ad8f4e439093eb4ee60c7c9461660568a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Mitch Curtis 2023-03-10 08:37:22 +08:00
parent fd23a222ef
commit 92c220812c
1 changed files with 17 additions and 17 deletions

View File

@ -27,28 +27,28 @@ Pane {
Component.onCompleted: forceActiveFocus()
}
}
component Line: Shape {
// Account for 1-pixel-wide lines.
width: Math.max(1, endX - startX)
height: Math.max(1, endY - startY)
component Line: Shape {
// Account for 1-pixel-wide lines.
width: Math.max(1, endX - startX)
height: Math.max(1, endY - startY)
layer.enabled: true
layer.samples: 4
layer.enabled: true
layer.samples: 4
property alias startX: shapePath.startX
property alias startY: shapePath.startY
property alias endX: pathLine.x
property alias endY: pathLine.y
property alias startX: shapePath.startX
property alias startY: shapePath.startY
property alias endX: pathLine.x
property alias endY: pathLine.y
ShapePath {
id: shapePath
strokeWidth: 1
strokeColor: "#444"
ShapePath {
id: shapePath
strokeWidth: 1
strokeColor: "#444"
PathLine {
id: pathLine
}
PathLine {
id: pathLine
}
}
}