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:
@@ -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", ""),
|
||||
|
||||
Reference in New Issue
Block a user