Use property & states instead of listening to changed signal

It makes a lot more sense to me to use states and an actual property.

CURA-7418
This commit is contained in:
Jaime van Kessel 2020-06-11 17:31:19 +02:00
parent f4c5a134c2
commit d33529f932
No known key found for this signature in database
GPG key ID: 3710727397403C91
2 changed files with 39 additions and 32 deletions

View file

@ -103,6 +103,11 @@ class Account(QObject):
self._authorization_service.accessTokenChanged.connect(self._onAccessTokenChanged)
self._authorization_service.loadAuthDataFromPreferences()
@pyqtProperty(int, notify=syncStateChanged)
def syncState(self):
return self._sync_state
def setSyncState(self, service_name: str, state: int) -> None:
""" Can be used to register sync services and update account sync states