Revert some timer changes

This commit is contained in:
Veronica Berglyd Olsen
2024-03-26 00:29:58 +01:00
parent eb0fac8a43
commit e64fb28d89
2 changed files with 9 additions and 11 deletions
+4 -10
View File
@@ -63,7 +63,6 @@ class SharedData(QObject):
indexCleared = pyqtSignal() indexCleared = pyqtSignal()
indexAvailable = pyqtSignal() indexAvailable = pyqtSignal()
mainClockTick = pyqtSignal() mainClockTick = pyqtSignal()
slowClockTick = pyqtSignal()
def __init__(self) -> None: def __init__(self) -> None:
super().__init__() super().__init__()
@@ -81,13 +80,9 @@ class SharedData(QObject):
self._idleRefTime = time() self._idleRefTime = time()
self._focusMode = False self._focusMode = False
self._fClock = QTimer(self) self._clock = QTimer(self)
self._fClock.setInterval(1000) self._clock.setInterval(1000)
self._fClock.timeout.connect(lambda: self.mainClockTick.emit()) self._clock.timeout.connect(lambda: self.mainClockTick.emit())
self._sClock = QTimer(self)
self._sClock.setInterval(10000)
self._sClock.timeout.connect(lambda: self.slowClockTick.emit())
return return
@@ -168,8 +163,7 @@ class SharedData(QObject):
soon as the Main GUI is created to ensure the SHARED singleton soon as the Main GUI is created to ensure the SHARED singleton
has the properties needed for operation. has the properties needed for operation.
""" """
self._fClock.start() self._clock.start()
self._sClock.start()
self._gui = gui self._gui = gui
self._theme = theme self._theme = theme
self._resetProject() self._resetProject()
+5 -1
View File
@@ -794,7 +794,11 @@ class _PreviewWidget(QTextBrowser):
self._updateDocMargins() self._updateDocMargins()
self._updateBuildAge() self._updateBuildAge()
SHARED.slowClockTick.connect(self._updateBuildAge) # Age Timer
self.ageTimer = QTimer(self)
self.ageTimer.setInterval(10000)
self.ageTimer.timeout.connect(self._updateBuildAge)
self.ageTimer.start()
return return