Improve Bluetooth error reporting with user-friendly messages
This is the continuation of the feature I started in MR !231 (closed). This change improves how connection errors are presented to users across BlueDevil. Instead of exposing raw BlueZ D-Bus error identifiers directly, errors are mapped to clear, localized, user-friendly messages.
High-level design (before):
The kcm and applet ui exposes the raw BlueZ error string.
flowchart LR
subgraph Before["Before"]
UI1["KCM / Applet UI"]
BQ1["BluezQt::PendingCall"]
UI1 -->|"1. errorText()"| BQ1
BQ1 -->|"2. raw BlueZ error string"| UI1
UI1 -->|"3. display"| User1["User sees raw error\n(e.g. br-connection-timeout)"]
end
High-level design (after):
Error-to-text mapping is centralized in the BlueDevil kded daemon. UI components delegate error interpretation to the daemon via D-Bus, ensuring consistent messaging across the KCM and the applet. However, I am not certain this is the optimal architectural solution, and I would appreciate feedback on alternative designs.
flowchart LR
subgraph After["After"]
UI2["KCM / Applet UI"]
BQ2["BluezQt::PendingCall"]
DBus["D-Bus: org.kde.BlueDevil\ngetErrorMessage()"]
Daemon["BlueDevil kded\nError mapping + i18n"]
UI2 -->|"1. errorText()"| BQ2
BQ2 -->|"2. raw error"| UI2
UI2 -->|"3. query"| DBus
DBus --> Daemon
Daemon -->|"4. user-friendly text"| DBus
DBus --> UI2
UI2 -->|"5. display"| User2["User sees friendly message"]
end
Error message:
| Before (current behavior) | After (with this change) |
|---|---|
|
|
|
|
|
Edited by Andrew Gigena


