fix(power): remove Wayland visibility restrictions on power settings#3254
Open
mhduiy wants to merge 1 commit into
Open
fix(power): remove Wayland visibility restrictions on power settings#3254mhduiy wants to merge 1 commit into
mhduiy wants to merge 1 commit into
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. Removed `platformName() !== "wayland"` visibility guards from BatteryPage, GeneralPage, PowerMain, and PowerPage 2. Power settings (screen & suspend, power plans, power saving, power button shortcuts) now show on Wayland 3. Kept applicable non-Wayland checks (virtual environment, battery presence, suspend capability) intact Log: Power management settings are no longer hidden on Wayland fix(power): 移除电源管理设置页面在 Wayland 下的可见性限制 1. 移除了 BatteryPage、GeneralPage、PowerMain、PowerPage 中的 `platformName() !== "wayland"` 可见性限制 2. 电源管理设置(屏幕与休眠、电源计划、省电设置、电源按钮快捷键)现在可在 Wayland 下显示 3. 保留了其他非 Wayland 相关的可见性检查(虚拟环境、电池状态、休眠能力) Log: 电源管理设置在 Wayland 环境下不再被隐藏 PMS: BUG-346597 PMS: BUG-346589 PMS: BUG-346575
2feded4 to
85e5d27
Compare
deepin pr auto review你好!我是CodeGeeX。我已仔细审查了你提供的 Git Diff。本次代码变更的核心逻辑是移除了在 QML 界面中对 Wayland 平台的大量显式隐藏限制( 以下是我对本次代码变更在语法逻辑、代码质量、代码性能和代码安全方面的详细审查意见: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
💡 改进建议代码针对上述审查意见,建议对 diff --git a/src/plugin-power/qml/GeneralPage.qml b/src/plugin-power/qml/GeneralPage.qml
index 91c20b3e19..e5f4a2b3c1 100644
--- a/src/plugin-power/qml/GeneralPage.qml
+++ b/src/plugin-power/qml/GeneralPage.qml
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2024 - 2027 UnionDESTech Co., Ltd. // 提示:请确认版权年份是否应恢复为2027
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.15
import QtQuick.Window 2.15
@@ -76,7 +76,7 @@ DccObject {
displayName: qsTr("Auto power saving on battery")
weight: 400
backgroundType: DccObject.Normal
- visible: dccData.model.haveBettary
+ visible: dccData.model.haveBattery // 修复拼写错误: Bettary -> Battery
pageType: DccObject.Editor
page: D.Switch {
checked: dccData.model.autoPowerSaveMode总结:本次代码变更方向是好的,它清除了不必要的前端平台硬编码判断,使得代码更简洁。但请务必确认底层接口在 Wayland 下的实际支持情况,修复版权年份的异常变更,并顺手修正遗留的拼写错误。 |
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.
platformName() !== "wayland"visibility guards from BatteryPage, GeneralPage, PowerMain, and PowerPageLog: Power management settings are no longer hidden on Wayland
fix(power): 移除电源管理设置页面在 Wayland 下的可见性限制
platformName() !== "wayland"可见性限制PMS: BUG-346597
PMS: BUG-346589
PMS: BUG-346575
Change-Id: I93bb377d21f1b6d5580c2ddd980411e8a87f92da