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
|
@ -55,7 +55,7 @@ OldCompo := Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
component Foo inherits Rectangle {
|
||||
export component Foo inherits Rectangle {
|
||||
|
||||
c1 := OldCompo {
|
||||
inout2: 42;
|
||||
|
|
|
@ -69,7 +69,7 @@ component A inherits Compo {
|
|||
// ^error{Unknown unqualified identifier 'priv1'}
|
||||
}
|
||||
|
||||
component Foo inherits Rectangle {
|
||||
export component Foo inherits Rectangle {
|
||||
|
||||
in property <[int]> input_model;
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ component Bar {
|
|||
@children
|
||||
}
|
||||
|
||||
component Baz {
|
||||
export component Baz {
|
||||
Bar {
|
||||
Foo {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||
|
||||
component Compo inherits Text {
|
||||
export component Compo inherits Text {
|
||||
|
||||
property <string> background: text;
|
||||
// ^error{Unknown unqualified identifier 'text'. Did you mean 'self.text'?}
|
||||
|
|
|
@ -293,7 +293,7 @@ component C11 {
|
|||
}
|
||||
}
|
||||
|
||||
Legacy1 := Rectangle {
|
||||
export Legacy1 := Rectangle {
|
||||
b1:= Button {}
|
||||
in property in1 <=> b1.pressed;
|
||||
// ^warning{Link to a output property is deprecated}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue