Make duplicate notification IDs non-fatal

The notification.Error there is unhandled otherwise.
This commit is contained in:
Florian Bruhin 2025-01-30 12:58:05 +01:00
parent e63781d49b
commit 7bd941cda0
2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,8 @@ Fixed
- Crash when trying to use the `DocumentPictureInPicture` JS API, such as done
by the new Google Workspaces Huddle feature. The API is unsupported by
QtWebEngine and now correctly disabled on the JS side. (#8449)
- Crash when a buggy notification presenter returns a duplicate ID (now an
error is shown instead).
[[v3.4.0]]
v3.4.0 (2024-12-14)

View File

@ -286,7 +286,10 @@ class NotificationBridgePresenter(QObject):
if replaces_id is None:
if notification_id in self._active_notifications:
raise Error(f"Got duplicate id {notification_id}")
message.error(f"Got duplicate notification id {notification_id} "
f"from {self._adapter.NAME}")
self._drop_adapter()
return
qt_notification.show()
self._active_notifications[notification_id] = qt_notification