mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
Route debug() calls in Slint consistently through Platform's debug_log() (#5718)
This commit is contained in:
parent
d8e7226cd5
commit
8a7db55bb6
4 changed files with 12 additions and 7 deletions
|
@ -124,6 +124,11 @@ upgrade_item_weak(const cbindgen_private::ItemWeak &item_weak)
|
|||
}
|
||||
}
|
||||
|
||||
inline void debug(const SharedString &str)
|
||||
{
|
||||
cbindgen_private::slint_debug(&str);
|
||||
}
|
||||
|
||||
} // namespace private_api
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -152,6 +152,11 @@ pub extern "C" fn slint_string_to_float(string: &SharedString, value: &mut f32)
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn slint_debug(string: &SharedString) {
|
||||
i_slint_core::debug_log!("{string}");
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
mod allocator {
|
||||
use core::alloc::Layout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue