Fix tests and add GUI refresh

This commit is contained in:
Veronica Berglyd Olsen
2025-07-17 17:30:07 +02:00
parent d027f218f8
commit 1223e6da84
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -280,12 +280,14 @@ class SharedData(QObject):
"""Update the value for the main progress bar.""" """Update the value for the main progress bar."""
if gui := self._gui: if gui := self._gui:
gui.mainProgress.setValue(value) gui.mainProgress.setValue(value)
QApplication.processEvents()
return return
def incMainProgress(self) -> None: def incMainProgress(self) -> None:
"""Increment the value for the main progress bar.""" """Increment the value for the main progress bar."""
if gui := self._gui: if gui := self._gui:
gui.mainProgress.setValue(gui.mainProgress.value() + 1) gui.mainProgress.setValue(gui.mainProgress.value() + 1)
QApplication.processEvents()
return return
def clearMainProgress(self, delay: float = 1.0) -> None: def clearMainProgress(self, delay: float = 1.0) -> None:
+1
View File
@@ -33,6 +33,7 @@ class MockGuiMain(QWidget):
self.mainStatus = MagicMock() self.mainStatus = MagicMock()
self.docEditor = MagicMock() self.docEditor = MagicMock()
self.docViewer = MagicMock() self.docViewer = MagicMock()
self.mainProgress = MagicMock()
self.projPath = "" self.projPath = ""
return return