fix(wallpaper): pass custom wallpaper by fd#273
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 |
1. Open custom wallpaper files in dde-appearance before calling dde-daemon. 2. Pass a DBus Unix fd with filename metadata to SaveCustomWallPaper. 3. Keep solid wallpaper handling explicit with the new isSolid argument. 4. Require a dde-daemon version that provides the fd-based wallpaper API. Log: Adapt dde-appearance custom wallpaper saving to the fd-based daemon API. fix(wallpaper): 通过fd传递自定义壁纸 1. 在 dde-appearance 调用 dde-daemon 前先打开自定义壁纸文件。 2. 调用 SaveCustomWallPaper 时传递 DBus Unix fd 和文件名元数据。 3. 通过新的 isSolid 参数显式保留纯色壁纸处理。 4. 依赖提供 fd 壁纸接口的 dde-daemon 版本。 Log: 适配 dde-appearance 基于 fd 的自定义壁纸保存接口。 PMS: BUG-368175
deepin pr auto review★ 总体评分:65分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 QString AppearanceDBusProxy::SaveCustomWallPaper(const QString &username, const QString &file, bool isSolid)
{
QFileInfo wallpaperInfo(file);
if (!wallpaperInfo.isFile() || !wallpaperInfo.isReadable()) {
qWarning() << "SaveCustomWallPaper: Invalid or unreadable file:" << file;
return QString();
}
QFile wallpaper(file);
if (!wallpaper.open(QIODevice::ReadOnly)) {
qWarning() << "SaveCustomWallPaper: Failed to open file:" << file;
return QString();
}
QDBusUnixFileDescriptor fd(wallpaper.handle());
if (!fd.isValid()) {
qWarning() << "SaveCustomWallPaper: Invalid file descriptor for file:" << file;
return QString();
}
QDBusMessage daemonMessage = QDBusMessage::createMethodCall(DaemonService, DaemonPath, DaemonInterface, "SaveCustomWallPaper");
daemonMessage << username << QVariant::fromValue(fd) << isSolid;
QDBusMessage reply = QDBusConnection::systemBus().call(daemonMessage);
if (reply.type() == QDBusMessage::ReplyMessage) {
return reply.arguments().value(0).toString();
}
qWarning() << "SaveCustomWallPaper: DBus call failed:" << reply.errorMessage();
return QString();
} |
|
@mhduiy: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Log: Adapt dde-appearance custom wallpaper saving to the fd-based daemon API.
fix(wallpaper): 通过fd传递自定义壁纸
Log: 适配 dde-appearance 基于 fd 的自定义壁纸保存接口。
PMS: BUG-368175