Rename C++'s internal AbstractRepeaterView to ModelChangeListener

For consistency with the Rust model implementation.
This commit is contained in:
Simon Hausmann 2022-09-27 10:26:55 +02:00
parent 5b95466fa6
commit 56983482b9
3 changed files with 8 additions and 8 deletions

View file

@ -436,13 +436,13 @@ inline Value::Value(const std::shared_ptr<slint::Model<Value>> &model)
{
using cbindgen_private::ModelAdaptorVTable;
using vtable::VRef;
struct ModelWrapper : private_api::AbstractRepeaterView
struct ModelWrapper : private_api::ModelChangeListener
{
std::shared_ptr<slint::Model<Value>> model;
cbindgen_private::ModelNotifyOpaque notify;
// This kind of mean that the rust code has ownership of "this" until the drop function is
// called
std::shared_ptr<AbstractRepeaterView> self;
std::shared_ptr<ModelChangeListener> self;
~ModelWrapper() { cbindgen_private::slint_interpreter_model_notify_destructor(&notify); }
void row_added(int index, int count) override