mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-24 05:26:29 +00:00
Introduce error handling in the FemtoVG and Skia renderers (#2402)
Avoid unwrap() and expect() and instead propagate errors all the way down to run_event_loop(), show(), and hide() in the Slint AIP.
This commit is contained in:
parent
7f95614a98
commit
8ffb5131c7
28 changed files with 627 additions and 357 deletions
|
@ -381,7 +381,7 @@ fn generate_public_component(llr: &llr::PublicComponent) -> TokenStream {
|
|||
fn run(&self) -> core::result::Result<(), slint::PlatformError> {
|
||||
self.show()?;
|
||||
slint::run_event_loop()?;
|
||||
self.hide();
|
||||
self.hide()?;
|
||||
core::result::Result::Ok(())
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ fn generate_public_component(llr: &llr::PublicComponent) -> TokenStream {
|
|||
self.window().show()
|
||||
}
|
||||
|
||||
fn hide(&self) {
|
||||
fn hide(&self) -> core::result::Result<(), slint::PlatformError> {
|
||||
self.window().hide()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue