On unix, the panic happens since the upgrade from zbus 3.10 to zbus 3.14
```
thread 'test_window_accessor' panicked at 'called `Option::unwrap()` on a `None` value', /home/olivier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_consumer-0.15.0/src/tree.rs:274:45
stack backtrace: [...]
3: core::option::Option<T>::unwrap
4: accesskit_consumer::tree::Tree::new
at /home/olivier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_consumer-0.15.0/src/tree.rs:274:19
5: accesskit_unix::adapter::Adapter::new
at /home/olivier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_unix-0.5.0/src/adapter.rs:53:20
6: accesskit_winit::platform_impl::platform::Adapter::new
at /home/olivier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_winit-0.14.1/src/platform_impl/unix.rs:21:23
7: accesskit_winit::Adapter::with_action_handler
at /home/olivier/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_winit-0.14.1/src/lib.rs:170:23
8: i_slint_backend_winit::accesskit::AccessKitAdapter::new
at ./accesskit.rs:62:20
9: i_slint_backend_winit::winitwindowadapter::WinitWindowAdapter:🆕:{{closure}}
at ./winitwindowadapter.rs:163:32
10: alloc::rc::Rc<T>::new_cyclic
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/rc.rs:461:20
11: i_slint_backend_winit::winitwindowadapter::WinitWindowAdapter::new
at ./winitwindowadapter.rs:148:23
12: i_slint_backend_winit::window_factory_fn
at ./lib.rs:71:5
13: <i_slint_backend_winit::Backend as i_slint_core::platform::Platform>::create_window_adapter
at ./lib.rs:220:9
```
The problem is that we get called to create the tree directly from
WinitWindowAdapter::new before the WinitWindowAdaptor is initialized,
So of course, the upgrade from weak is still the pseudo-weak from
Rc::new_cyclic, so the upgrade fails, resulting in a default constructed
`TreeUpdate` which is invalid for the first call as it doesn't have a
tree.
Just give it a tree with a dummy id
This doesn't seem to be needed anymore with newer rust version.
As long as one symbol from the crate is used, all exported function
from the crate are available.
The reason why some symbols in some module were gone was a bug in rust
that has been fixed, it seems
The OpenGL Texture import example uses a Slider in the range 0..1. That doesn't work with
QStyleOptionSlider out of the box because it's
using integer values.
* Configure clippy to not report about type complexity until *much*
later
* Configure clippy to only complain about more than 10 function
arguments
* Properly format safety sections
* Allow unnecessary main functions in doctests in the slint API crate
* AccessKit: Move big block of code before if condition
Avoid duplicating the core-graphics crate, as that leads to linking
errors about duplicate emissions of the cg_event_tap_callback_internal
helper function from the core-graphics crate.
This partially reverts commit d91622d64f
In order to re-apply d91622d64f, winit
needs to release a new version first.
* Refactor ProgressIndicator api according to api review.
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Capping progress also for native.
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
The action requests on Windows typically come in from a non-main thread,
so we'd try to clone the send wrapper in `do_action`
in a non-main thread. That panics unfortunately - send-wrapper
requires the clone to be done in the original thread.
To work around this, wrap the send-wrapper in an Arc, which we can
safely clone. Then inside the closure invoked from within the main thread,
we can clone the send wrapper safely and then take out the Weak
from it (safely as well).