mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +00:00
Change Model::row_data to return an Option<T> (#873)
Change Model::row_data to return an Option<T> (rust) or std::optional<T> (c++) Co-authored-by: Olivier Goffart <olivier@woboq.com> Co-authored-by: Simon Hausmann <hausmann@gmail.com>
This commit is contained in:
parent
e2ec76f9ef
commit
e3c4209b1f
24 changed files with 229 additions and 102 deletions
|
@ -27,7 +27,7 @@ int main()
|
|||
int offset = 0;
|
||||
int count = todo_model->row_count();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
if (todo_model->row_data(i - offset).checked) {
|
||||
if (todo_model->row_data(i - offset)->checked) {
|
||||
todo_model->erase(i - offset);
|
||||
offset += 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue