Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add network parameter jump function #285

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

caixr23
Copy link
Contributor

@caixr23 caixr23 commented Dec 12, 2024

网络加带参数的跳转
ShowPage参数
network?ssid=xxx // 跳转到无线网络xxx的配置页面
network?page=wired // 跳转到第一个有线网络页面
network?page=wireless // 跳转到第一个无线网络页面

pms: TASK-361719

网络加带参数的跳转
ShowPage参数
network?ssid=xxx       // 跳转到无线网络xxx的配置页面
network?page=wired     // 跳转到第一个有线网络页面
network?page=wireless  // 跳转到第一个无线网络页面

pms: TASK-361719
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码重复:在networkMain.qml文件中,PageVPNPageDetails的组件定义中,每个组件都添加了一个property var showPage: root.showPage,这导致了代码重复。建议将这些重复的代码提取到一个公共的函数或组件中。

  2. 变量命名:在netmanagerthreadprivate.cpp文件中,m_findApcmd变量被重命名为m_showPageCmd,但m_findApTimer被重命名为m_showPageTimer。建议保持变量命名的一致性,避免混淆。

  3. 定时器使用:在NetManagerThreadPrivate::doShowPage函数中,QTimer::singleShot用于在10秒后清除m_showPageCmd,但QTimer::singleShot实际上是一个一次性定时器,而不是重复定时器。如果需要重复检查,应该使用QTimerstart方法。

  4. 错误处理:在NetManagerThreadPrivate::toShowPage函数中,当paramMap不包含pagessid时,函数直接返回true。这可能不是预期的行为,应该添加适当的错误处理或日志记录。

  5. 翻译文件:在translations目录下的所有.ts文件中,<name>标签从networkMain更改为network,这可能会导致翻译文件与实际使用的组件名称不一致。建议保持翻译文件与实际组件名称的一致性。

  6. 代码注释:在netmanagerthreadprivate.cpp文件中,doShowPage函数的注释应该更新,以反映函数的新功能。

  7. 代码风格:在netmanagerthreadprivate.cpp文件中,if语句和for循环的缩进不一致,建议统一缩进风格以提高代码的可读性。

  8. 安全性:在NetManagerThreadPrivate::toShowPage函数中,QDBusMessage的使用可能存在安全风险,应该确保传入的参数是可信的,以防止潜在的注入攻击。

以上是针对代码提交的审查意见,希望能够对代码的改进有所帮助。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23, kegechen

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caixr23 caixr23 merged commit eece112 into linuxdeepin:master Dec 12, 2024
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants