Make sure Signal are disconnected when PackageModel is deleted

Contributes to CURA-8587
This commit is contained in:
Jelle Spijker 2021-12-16 17:00:29 +01:00
parent 23d6c2390f
commit ffa34ab5fe
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
2 changed files with 10 additions and 1 deletions

View file

@ -55,6 +55,8 @@ class PackageList(ListModel):
def __del__(self) -> None:
""" When this object is deleted it will loop through all registered API requests and aborts them """
self.cleanUpAPIRequest()
self.isLoadingChanged.disconnect()
self.hasMoreChanged.disconnect()
def abortRequest(self, request_id: str) -> None:
"""Aborts a single request"""