Commit graph

13 commits

Author SHA1 Message Date
Tobias Hunger
dbf8c9e16a
examples: Do not fail todo example test (#8293)
* examples: Do not fail `todo` example test

... when `SLINT_ENABLE_DEBUG_INFO` is not set.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-04-28 13:20:52 +02:00
Olivier Goffart
6f4f5aeefa Replace no_mangle with unsafe(no_mangle) in example and docs
We can't just do `s/#\[no_mangle]/#[unsafe(no_mangle)]/g`
because the version of cbingen we use doesn't understand the unsafe
attribute yet.

Part of #7998
2025-03-31 17:35:22 +02:00
Simon Hausmann
52f8249189 testing: Minor rename after a quick round of API review
- ElementHandle::match_descendants() becomes ElementHandle::query_descendants() to emphasize that this creates a query.
- Added ElementQuery::from_root() to remove the need to use the ElementRoot trait.
2024-07-15 11:30:34 +02:00
Simon Hausmann
c90abe0539 Switch Rust Todo app unit testing to use the new API to lcoate the line edit. 2024-07-15 11:30:34 +02:00
Arnold Loubriat
ce2db77e88
Add the accessible-placeholder-text property (#5464) 2024-06-26 12:59:22 +02:00
Olivier Goffart
15f09c9224 Testing: expose the description and the checked accessible property
also rename default_action to accessible_default_action
2024-04-26 15:09:37 +02:00
Simon Hausmann
87e6da2131 Make ElementHandle::set_accessible_value easier to use
Take an impl Into<SharedString> so that it can be called with a string literal.
2024-04-24 10:39:03 +02:00
Olivier Goffart
4856f387ee C++ Todo example: add test 2024-04-22 13:54:28 +02:00
Olivier Goffart
64404ceca2 accessibility: return an Option for accessible string values
So we can know whether the item had the property set at all or not
2024-04-19 11:23:26 +02:00
Olivier Goffart
d4741efac0 testing: rename the init function 2024-04-18 18:45:31 +02:00
Olivier Goffart
583eadbdbc testing backend: API fixes 2024-04-18 18:45:31 +02:00
Olivier Goffart
adc9be8317 WIP: allow searching elements by accessible label in tests 2024-04-18 18:45:31 +02:00
Olivier Goffart
b236d2d06e Examples: make both a lib and a bin by default
Note that the trick to use the same file for both was not ideal because
it produces a warning and would compile it twice if it was by default.
So just make both a lib.rs and a main.rs
2024-02-22 09:02:06 +01:00