diff --git a/harmonyqml/backend/model/list_model.py b/harmonyqml/backend/model/list_model.py index d9db6683..61378f46 100644 --- a/harmonyqml/backend/model/list_model.py +++ b/harmonyqml/backend/model/list_model.py @@ -238,10 +238,10 @@ class ListModel(QAbstractListModel): @pyqtSlot(int, "QVariantMap", "QStringList", result=int) @pyqtSlot(str, "QVariantMap", result=int) @pyqtSlot(str, "QVariantMap", "QStringList", result=int) - def update(self, - index: Index, - value: NewItem, - ignore_roles: Sequence[str] = ()) -> int: + def updateItem(self, + index: Index, + value: NewItem, + ignore_roles: Sequence[str] = ()) -> int: value = self._convert_new_value(value) i_index: int = self.indexWhere(index, _can_use_default_factory=False) \ @@ -283,7 +283,9 @@ class ListModel(QAbstractListModel): new_index_if_update: Optional[int] = None, ignore_roles: Sequence[str] = ()) -> None: try: - index = self.update(where_main_key_is, update_with, ignore_roles) + index = self.updateItem( + where_main_key_is, update_with, ignore_roles + ) except (IndexError, ValueError): self.insert(new_index_if_insert or len(self), update_with) else: diff --git a/harmonyqml/backend/signal_manager.py b/harmonyqml/backend/signal_manager.py index 002c1e2a..340b2ecc 100644 --- a/harmonyqml/backend/signal_manager.py +++ b/harmonyqml/backend/signal_manager.py @@ -336,7 +336,7 @@ class SignalManager(QObject): break if update_at is not None: - model.update(update_at, new_event) + model.updateItem(update_at, new_event) self._events_in_transfer -= 1 return new_event