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: crashed when access DSGApplication::id early #418

Merged
merged 1 commit into from
May 21, 2024

Conversation

18202781743
Copy link
Contributor

Add fallback, using fileName of /proc/self/exe as AppId.
Remove assert for empty appId.

deepin-ci-robot added a commit to linuxdeepin/dtk6core that referenced this pull request May 17, 2024
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#418
@18202781743
Copy link
Contributor Author

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 17, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

src/dsgapplication.cpp Outdated Show resolved Hide resolved
src/dsgapplication.cpp Outdated Show resolved Hide resolved
deepin-ci-robot added a commit to linuxdeepin/dtk6core that referenced this pull request May 17, 2024
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#418
@18202781743 18202781743 requested a review from zccrs May 17, 2024 09:45
src/dsgapplication.cpp Outdated Show resolved Hide resolved
src/dsgapplication.cpp Show resolved Hide resolved
src/dsgapplication.cpp Outdated Show resolved Hide resolved
src/dsgapplication.cpp Show resolved Hide resolved
src/dsgapplication.cpp Outdated Show resolved Hide resolved
@18202781743 18202781743 requested a review from zccrs May 17, 2024 09:56
@kegechen kegechen requested a review from asterwyx May 20, 2024 07:31
kegechen
kegechen previously approved these changes May 20, 2024
Add fallback, using fileName or cmdline as AppId.
Remove assert for empty appId.
deepin-ci-robot added a commit to linuxdeepin/dtk6core that referenced this pull request May 21, 2024
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#418
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • formatAppId函数中,使用了正则表达式来替换非法字符,但没有考虑到中文和特殊字符的情况。
  • QFileQIODevice的使用没有显式地关闭文件,可能会导致资源泄露。
  • qCDebugqCWarning的使用在生产环境中可能不合适,应该使用qDebugqWarning来区分调试和错误信息。
  • 代码中的qt_assert已被Q_ASSERT替代,建议统一代码风格。

是否建议立即修改:

@18202781743 18202781743 requested a review from kegechen May 21, 2024 01:17
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, zccrs

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

@18202781743 18202781743 merged commit c56b7ea into linuxdeepin:master May 21, 2024
20 of 21 checks passed
kegechen pushed a commit to linuxdeepin/dtk6core that referenced this pull request May 24, 2024
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#418
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.

4 participants