mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 15:47:26 +00:00
C++: Move internal testing function to the internal namespace
Remove send_keyboard_char as it doesn't appear to be used (while send_keyboard_string_sequence is used in a single test)
This commit is contained in:
parent
c1707d52e1
commit
7c3f8683b7
2 changed files with 2 additions and 16 deletions
|
@ -1051,21 +1051,7 @@ public:
|
|||
};
|
||||
}
|
||||
|
||||
namespace slint::testing {
|
||||
|
||||
using cbindgen_private::KeyboardModifiers;
|
||||
|
||||
/// Send a key events to the given component instance
|
||||
inline void send_keyboard_char(const slint::interpreter::ComponentInstance *component,
|
||||
const slint::SharedString &str, bool pressed)
|
||||
{
|
||||
const cbindgen_private::WindowAdapterRcOpaque *win_ptr = nullptr;
|
||||
cbindgen_private::slint_interpreter_component_instance_window(
|
||||
reinterpret_cast<const cbindgen_private::ErasedItemTreeBox *>(component), &win_ptr);
|
||||
cbindgen_private::slint_send_keyboard_char(
|
||||
&str, pressed, reinterpret_cast<const cbindgen_private::WindowAdapterRc *>(win_ptr));
|
||||
}
|
||||
|
||||
namespace slint::private_api::testing {
|
||||
/// Send a key events to the given component instance
|
||||
inline void send_keyboard_string_sequence(const slint::interpreter::ComponentInstance *component,
|
||||
const slint::SharedString &str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue