Connect sync timer to sync() for consistency and add unit tests.

Also rename a function to camelCase

CURA-7473
This commit is contained in:
Nino van Hooff 2020-06-26 16:09:33 +02:00
parent 4f1a18f102
commit 294afdb7ca
3 changed files with 56 additions and 3 deletions

View file

@ -94,7 +94,7 @@ class Account(QObject):
self._update_timer.setInterval(int(self.SYNC_INTERVAL * 1000))
# The timer is restarted explicitly after an update was processed. This prevents 2 concurrent updates
self._update_timer.setSingleShot(True)
self._update_timer.timeout.connect(self.syncRequested)
self._update_timer.timeout.connect(self.sync)
self._sync_services = {} # type: Dict[str, int]
"""contains entries "service_name" : SyncState"""
@ -282,7 +282,7 @@ class Account(QObject):
self._sync()
@pyqtSlot()
def update_packages(self):
def onUpdatePackagesClicked(self):
if self._update_packages_action is not None:
self._update_packages_action()