Fix signal cross-thread : QueuedConnection pour upload/IMAP

Les signaux émis depuis les threads Flask/IMAP ne déclenchaient pas
le slot dans le thread principal. Forcé QueuedConnection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-21 22:54:06 +01:00
parent c4db1ac101
commit 2c928ae84d

View File

@@ -24,7 +24,8 @@ def main():
host = config.get("server_ip", "0.0.0.0")
upload_server = UploadServer(host=host, port=port)
upload_server.signals.photos_received.connect(
window.home_screen.notify_qr_photos
window.home_screen.notify_qr_photos,
Qt.ConnectionType.QueuedConnection
)
upload_server.start()
@@ -32,7 +33,8 @@ def main():
imap_watcher = ImapWatcher()
if config.get("imap_enabled"):
imap_watcher.signals.photos_received.connect(
window.home_screen.notify_email_photos
window.home_screen.notify_email_photos,
Qt.ConnectionType.QueuedConnection
)
imap_watcher.start(
server=config.get("imap_server", ""),