mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
C++: Permit passing a value to VectorModel::set_vector by value (#4491)
The previous signature would not allow that, but we should allow it for consistency with the constructor.
This commit is contained in:
parent
e4c087c5b0
commit
45f182e666
2 changed files with 5 additions and 1 deletions
|
|
@ -524,4 +524,8 @@ TEST_CASE("VectorModel clear and replace")
|
|||
REQUIRE(observer->changed_rows.empty());
|
||||
REQUIRE(observer->removed_rows.empty());
|
||||
REQUIRE(observer->model_reset);
|
||||
|
||||
// Test that taking a vector by value compiles
|
||||
std::vector<int> new_data { 5, 6, 7, 8 };
|
||||
model->set_vector(new_data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue