-
Notifications
You must be signed in to change notification settings - Fork 73
fix: Adapting to QProcess Usage in Qt 6 #1118
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
Conversation
Log: The abnormal execution of QProcess resulted in empty fuser output, causing port availability verification to fail, which ultimately led to connection failures with the correct debugging backend and freeze ide Bug: https://pms.uniontech.com/bug-view-315851.html
deepin pr auto review关键摘要:
是否建议立即修改:
建议的修改措施:
|
Reviewer's GuideThis PR adapts the QProcess invocation to Qt 6’s stricter API by invoking the shell explicitly when running the fuser command to reliably detect free ports. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @LiHua000 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| process.waitForFinished(); | ||
| QString ret = process.readAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Capture stderr output for better diagnostics
Call process.readAllStandardError() to catch fuser or shell errors and improve debug info when port checks fail.
| process.waitForFinished(); | |
| QString ret = process.readAll(); | |
| process.waitForFinished(); | |
| // capture both stdout and stderr for better diagnostics | |
| QString ret = process.readAllStandardOutput(); | |
| QString err = process.readAllStandardError(); | |
| if (!err.isEmpty()) { | |
| qDebug() << "checkPortFree stderr:" << err.trimmed(); | |
| } |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepin-mozart, LiHua000 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Log: The abnormal execution of QProcess resulted in empty fuser output, causing port availability verification to fail, which ultimately led to connection failures with the correct debugging backend and freeze ide
Bug: https://pms.uniontech.com/bug-view-315851.html
Summary by Sourcery
Bug Fixes:
bash -cinstead of directly passing the command to QProcess to capture its output correctly.