Commit graph

49 commits

Author SHA1 Message Date
Yuri Astrakhan
61de4d56b0 Fix all format arg inlining
Ran this command:

```shell
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-06 10:16:20 +01:00
Olivier Goffart
95f5685789
Bundle translations (#6661)
This currently doesn't have public API to enable it yet.

TODO:
 - Error handling in the compiler
 - Public API in the compiler configuration
 - Documentation
2024-10-29 15:07:15 +01:00
Tobias Hunger
45c24803f2 compiler: Remove version info from SourceFile again
... and fix the fallout of that change.
2024-08-21 16:55:13 +02:00
Olivier Goffart
5dfa8d56dc API review of the slint interpreter Compiler api
Closes #5466
2024-07-05 17:20:08 +02:00
Simon Hausmann
a52fe6bbfc Make element debug information configurable
The `SLINT_EMIT_DEBUG_INFO` environment variable needs to be set for Rust and C++ builds. For the interpreter it's always enabled, since ... we have it.
2024-06-05 01:29:58 -07:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Olivier Goffart
af09222dfd
widgets tests: Also test with the interpreter 2024-05-07 12:38:33 +02:00
Olivier Goffart
c5f857ffc9 Change callback: gate behind experimental flag 2024-05-02 22:25:53 +02:00
Olivier Goffart
d4741efac0 testing: rename the init function 2024-04-18 18:45:31 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Tobias Hunger
06b04e71b5 compiler: Return the TypeLoader from compile_syntax_node 2024-02-29 19:35:52 +01:00
Simon Hausmann
d4a6c5774e Add support for writing tests that run with all styles
Tests under tests/cases/for_each_style are run with all styles at least
in the Rust driver.

Amends 6bb9905191 to include a test that
using edited works.
2024-02-23 16:12:45 +01:00
Olivier Goffart
2a56542527 Use BufWriter also in some tests 2023-12-27 10:11:48 +01:00
Tobias Hunger
d785f2d5df compiler: Store an optional version number with the document
A None value means the file on disk is the golden version.

We have an editor, the LSP and the preview that all need to at least
notice when they have newer data then their peers. So IMHO it makes
sense to have an optional document version around.

The language server protocol makes use of a version number already. This
patch moves that code into the compiler so that it is stored with the
actual data getting versioned.
2023-12-18 14:21:50 +01:00
Olivier Goffart
6ebfad14db Fix panic in the interpreter when using visible in a ListView
This doesn't solve the issue #2537, but at least prevent the panic

Drive by change to fix compile when a struct is named `Box`
2023-12-12 14:01:55 +01:00
J-P Nurmi
c5248c005e Allow specifying paths for @library imports 2023-10-20 16:47:00 +02:00
J-P Nurmi
030a33796e Tests: add support for //ignore: <driver(s)> 2023-09-28 09:16:50 +02:00
Tobias Hunger
b55cdb9cf4 Make ComponentContainer a compiler configuration feature
Require `SLINT_EXPERIMENTAL_FEATURES` to be set in the environment to
enable `ComponentContainer` and `component-factory`.
2023-07-27 12:04:16 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Olivier Goffart
259444b577 Silent "warnings" in the rust test driver when using the macro
Otherwse they show up as error because of the deny(warning) in the test.
This is not a problem in the CI because CI uses --all-features that use
the build-time thing, but this is a problem when running locally
2023-03-24 11:14:48 +01:00
Olivier Goffart
a0d057b8b8 Enable the new syntax by default 2023-01-07 14:18:10 +01:00
Florian Blasius
501c6af746
Add swr render test and driver (#1955)
* add test-driver-screenshots
* add screenshot based software renderer testing
* create reference screenshots for testing with  test-driver-screenshots
* add documentation to testing `README.md`
2022-12-12 11:23:27 +01:00
Olivier Goffart
c1c52a2b86 Make the test pass without defining the SLINT_EXPERIMENTAL_SYNTAX env variable 2022-11-21 22:01:52 +01:00
Olivier Goffart
88d231f3ec Move the testing module from away from public api
move it the testing backend
2022-09-06 17:27:15 +02:00
Olivier Goffart
fc3e8d6d99 CI: use the fluent style for the rust test
because the native style causes issues as the tests runs in different
threads
2022-08-30 22:21:03 +02:00
Olivier Goffart
9eb8518278 Add a warning when setting a two way binding for which the rhs does not declare a default value
Because of issue #1394 and because the semantic are not properly defined
currently, we decided that future version of slint should always and only
take the binding from the right hand side, even if it has no bindings.

Since we can't change the behavior in 0.2, just add a warning instead for now.
The warning can be silenced by setting a default binding for the property on the rhs.

Ignoring the warning can still lead to panic (the one in #1394)
2022-07-08 19:05:54 +02:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Olivier Goffart
7bf6c4826f Fix a few more occurences of slixtyfps 2022-02-02 17:01:00 +01:00
Tobias Hunger
cc3994b58d
Rename rust API 2022-02-02 13:26:35 +01:00
Simon Hausmann
7382ea1f2c Rename SIXTYFPS_EMBED_RESOURCES environment variable 2022-02-02 09:10:52 +01:00
Simon Hausmann
cab22f8355 Rename the sixtyfps-compilerlib crate 2022-02-01 18:08:18 +01:00
Simon Hausmann
9494068201 Rename the sixtyfps-rendering-backend-selector crate 2022-02-01 18:06:49 +01:00
Simon Hausmann
be83d60bd8 Simplify signature of compiler code generator
Remove the unused diagnostics parameter.
2022-01-19 10:02:23 +01:00
Tobias Hunger
c89fa46b2c
janitor: Remove some redundent clone() calls 2022-01-04 18:20:24 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
9401bfbec7 Rust test driver: Add a feature to generate the rust code in build.rs
instead of in the sixtyfps! macro, so se actually see where the error is in
the generated code.

This also expose a bunch of warning that were not being taken care on.
2021-11-05 11:35:56 +01:00
Olivier Goffart
6450f8b8d7 Fix the text_default_color test on my machine
It was using the native style for me, which does not default to black
2021-08-24 14:03:50 +02:00
Simon Hausmann
5fd63b63f1 Add build test coverage for using images but not embedding them
The rust generator produced some code that didn't compile, which is fixed now.
2021-08-03 10:31:29 +02:00
Tobias Hunger
ec5646566a Janitor: Use insert over insert_str to insert a single character 2021-07-03 22:34:53 +02:00
Tobias Hunger
af7e53566b Janitor: clippy says to prefer writeln! over write! ending in \n 2021-07-03 22:34:53 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
a0e910abf0 Use the testing backend for rust 2021-05-11 11:40:26 +02:00
Olivier Goffart
49c7300907 Support for if else in statements 2021-02-05 13:53:37 +01:00
Olivier Goffart
a143656dc9 Test driver: move some common code in the lib 2021-02-03 10:32:25 +01:00
Olivier Goffart
09ce4142a5 Some reorganization of the testdriver 2021-02-01 18:13:19 +01:00
Renamed from tests/rustdriver/build.rs (Browse further)