-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compiler: Change a new error from 1.9 to a warning
To keep compatibility with existing Slint code Commit 53e7900 added a call to LayoutConstraints::new which is shown to produce error in the crater run.
- Loading branch information
Showing
4 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright © SixtyFPS GmbH <[email protected]> | ||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 | ||
|
||
export Test := Rectangle { | ||
export component Test inherits Rectangle { | ||
|
||
GridLayout { | ||
Rectangle { | ||
|
@@ -18,5 +18,28 @@ export Test := Rectangle { | |
} | ||
} | ||
|
||
// outside a layout | ||
Rectangle { | ||
width: 42px; | ||
// ^error{Cannot specify both 'width' and 'min-width'} | ||
min-width: 5rem; | ||
} | ||
|
||
Rectangle { | ||
// Slint 1.8 and earlier did not complain about extra specifications when the item is not in a layout | ||
// contains a layout that's why it's a warning instead now | ||
height: 10rem; | ||
// ^warning{Cannot specify both 'height' and 'min-height'} | ||
min-height: 8rem; | ||
HorizontalLayout { | ||
Rectangle { | ||
height: 42px; | ||
// ^error{Cannot specify both 'height' and 'max-height'} | ||
max-height: 12px; | ||
|
||
} | ||
} | ||
} | ||
|
||
|
||
} |