Qt5->Qt6: Rectify constant locations: UserRole, CppOwnership

part of CURA-8591
This commit is contained in:
Remco Burema 2021-12-28 14:54:56 +01:00
parent abe7c1bf7f
commit 32b52c6166
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
25 changed files with 167 additions and 167 deletions

View file

@ -25,10 +25,10 @@ class UpdatableMachinesModel(ListModel):
def __init__(self, parent = None) -> None:
super().__init__(parent)
self.addRoleName(Qt.UserRole + 1, "id")
self.addRoleName(Qt.UserRole + 2, "name")
self.addRoleName(Qt.UserRole + 3, "displayName")
self.addRoleName(Qt.UserRole + 4, "type") # Either "default_option" or "machine"
self.addRoleName(Qt.ItemDataRole.UserRole + 1, "id")
self.addRoleName(Qt.ItemDataRole.UserRole + 2, "name")
self.addRoleName(Qt.ItemDataRole.UserRole + 3, "displayName")
self.addRoleName(Qt.ItemDataRole.UserRole + 4, "type") # Either "default_option" or "machine"
def update(self, machines: List[GlobalStack]) -> None:
items = [create_new_list_item] # type: List[Dict[str, str]]