fix(batchprint): send DBus notification with correct argument signature - #402
Merged
Merged
Conversation
QDBusInterface::call() with a QVariantList marshalled all args into one 'av' parameter, which the deepin notification daemon rejects, so every notification fell back to invisible stderr. Use QDBusMessage:: setArguments() to send the 8 separate parameters. Also update all language ts files with lupdate and fill zh_CN/zh_HK/zh_TW translations. QDBusInterface::call() 传入 QVariantList 时会把全部参数编码为单个 'av' 参数,被 deepin 通知服务拒绝,导致所有通知静默回退到不可见 的 stderr。改用 QDBusMessage::setArguments() 发送 8 个独立参数; 同时用 lupdate 更新全部语言 ts 文件并补充 zh_CN/zh_HK/zh_TW 翻译。 Log: 修复批量打印无打印机时无错误提示的问题 Influence: 批量打印的成功/失败/错误通知可正常弹出,通知文案支持简繁中文。
lzwind
approved these changes
Sep 20, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
批量打印功能在没有打印机的环境下打印文件,桌面无任何错误提示。
根因
NotifyClient通过QDBusInterface::call("Notify", args)发送通知时,QVariantList被隐式转换为单个 QVariant 参数,实际发出的 DBus 签名为av,而非规范要求的susssasa{sv}i。deepin 通知守护进程对签名严格匹配,返回UnknownMethod,通知全部静默回退到 stderr——而右键菜单以 detached 方式启动进程,stderr 无人可见。修复
QDBusMessage::createMethodCall+setArguments()按 8 个独立参数发送Notify调用notifyResult/notifyError统一走sendNotification(),消除重复代码buildNotifyMessage()供回归测试断言消息结构翻译
batch-print目录)测试