chore: Remove unused code - #481
Merged
deepin-bot[bot] merged 1 commit intoJun 29, 2026
Merged
Conversation
There was a problem hiding this comment.
Sorry @GongHeng2017, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017 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 |
--Remove unused code that poses security risks
GongHeng2017
force-pushed
the
202606232051-re-eagle-fix
branch
from
June 26, 2026 09:27
fee86ee to
05c3e1c
Compare
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/application/utils.cpp b/application/utils.cpp
--- a/application/utils.cpp
+++ b/application/utils.cpp
@@ -1,3 +1,8 @@
+// 替代被删除的 Utils::getHomePath,在全局静态初始化阶段统一处理家目录获取逻辑
+// 2.systemd服务启动deepin-log-viewer,QDir::homePath返回的是/,因该方式下freedesktop dbus接口获取为空,只能将/root作为homePath
+QString Utils::homePath = ((QDir::homePath() != "/root" && QDir::homePath() != "/") ? QDir::homePath() : (QDir::homePath() == "/" ? "/root" : DBusManager::getHomePathByFreeDesktop()));
+
#include "utils.h"
#include "dbusmanager.h"
diff --git a/application/utils.h b/application/utils.h
--- a/application/utils.h
+++ b/application/utils.h
@@ -40,6 +40,7 @@ class Utils : public QObject
explicit Utils(QObject *parent = nullptr);
~Utils();
+ static QString homePath; // 提供全局安全的家目录访问
static QString getCurrentUserName();
static bool isValidUserName(const QString &userName);
static bool isCoredumpctlExist(); |
max-lvs
approved these changes
Jun 29, 2026
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
deepin-bot
Bot
merged commit Jun 29, 2026
e903de8
into
linuxdeepin:release/eagle
22 of 23 checks passed
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.
--Remove unused code that poses security risks