Rename ListModel.update() to updateItem()
This commit is contained in:
parent
2a687f8eee
commit
45c928ea17
|
@ -238,7 +238,7 @@ class ListModel(QAbstractListModel):
|
|||
@pyqtSlot(int, "QVariantMap", "QStringList", result=int)
|
||||
@pyqtSlot(str, "QVariantMap", result=int)
|
||||
@pyqtSlot(str, "QVariantMap", "QStringList", result=int)
|
||||
def update(self,
|
||||
def updateItem(self,
|
||||
index: Index,
|
||||
value: NewItem,
|
||||
ignore_roles: Sequence[str] = ()) -> int:
|
||||
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user