mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
First stage of cleaning up the export handling of the slint root component (#2095)
We implicitly export the last component of a .slint file to the generator. Issue a warning when that happens and suggest to export it explicitly.
This commit is contained in:
parent
33d68687c2
commit
24dcef5fed
130 changed files with 175 additions and 143 deletions
|
@ -14,7 +14,7 @@ WithStates := Rectangle {
|
|||
]
|
||||
}
|
||||
|
||||
Test := Rectangle {
|
||||
export Test := Rectangle {
|
||||
|
||||
property <int> a: 45 + root.b;
|
||||
// ^error{The binding for the property 'a' is part of a binding loop}
|
||||
|
|
|
@ -35,7 +35,7 @@ T4 := Rectangle {
|
|||
property <length> my_property <=> x;
|
||||
}
|
||||
|
||||
App := Rectangle {
|
||||
export App := Rectangle {
|
||||
|
||||
|
||||
VerticalLayout {
|
||||
|
|
|
@ -18,7 +18,7 @@ Compo1 := Rectangle {
|
|||
// ^error{The binding for the property 'bb' is part of a binding loop}
|
||||
}
|
||||
|
||||
App := Rectangle {
|
||||
export App := Rectangle {
|
||||
cc := Compo1 {
|
||||
aa() => { return self.a; }
|
||||
// ^error{The binding for the property 'aa' is part of a binding loop}
|
||||
|
@ -29,4 +29,4 @@ App := Rectangle {
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ Alias := Rectangle {
|
|||
property <int> ps_width <=> viewport_width;
|
||||
}
|
||||
|
||||
Foo := Rectangle {
|
||||
export Foo := Rectangle {
|
||||
property <int> base-prop: alias.viewport_width;
|
||||
// ^error{The binding for the property 'base-prop' is part of a binding loop}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ TC := Rectangle {
|
|||
}
|
||||
|
||||
|
||||
Test := Rectangle {
|
||||
export Test := Rectangle {
|
||||
VerticalLayout {
|
||||
// ^error{The binding for the property 'layoutinfo-h' is part of a binding loop} // FIXME: That's an internal property, but people might understand
|
||||
// ^^error{The binding for the property 'min-width' is part of a binding loop}
|
||||
|
|
|
@ -26,7 +26,7 @@ Wrap := Rectangle {
|
|||
property <bool> test: square.width == square.height;
|
||||
}
|
||||
|
||||
Test := Rectangle {
|
||||
export Test := Rectangle {
|
||||
property <image> source;
|
||||
GridLayout {
|
||||
// ^error{The binding for the property 'layout-cache-h' is part of a binding loop}
|
||||
|
|
|
@ -22,7 +22,7 @@ Compo := Rectangle {
|
|||
|
||||
}
|
||||
|
||||
Foo := Rectangle {
|
||||
export Foo := Rectangle {
|
||||
Compo {
|
||||
// ^error{The binding for the property 'preferred-width' is part of a binding loop}
|
||||
the_text: self.preferred-width / 1px;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
Key := Rectangle { property <int> pos; property <int> num_elements; }
|
||||
|
||||
Test := Rectangle {
|
||||
export Test := Rectangle {
|
||||
Rectangle {
|
||||
property <int> num_elements;
|
||||
num-elements: 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue