-
Notifications
You must be signed in to change notification settings - Fork 37
Feat: [Adjust_QT5] Add code to adjust QT5 #314
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
Feat: [Adjust_QT5] Add code to adjust QT5 #314
Conversation
-- Add code to adjust QT5 Log: add feature Task: https://pms.uniontech.com/task-view-383493.html
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduce conditional compilation for QT version compatibility by guarding new child process modifier setup calls for QT6+ and aligning enterEvent overload signatures to QT5 or QT6 APIs. Class diagram for PreviousLabel changes (QT5/QT6 compatibility)classDiagram
class PreviousLabel {
+paintEvent(QPaintEvent *e)
+mouseDoubleClickEvent(QMouseEvent *event)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+enterEvent(QEvent *event)
#else
+enterEvent(QEnterEvent *event)
#endif
+leaveEvent(QEvent *event)
+focusInEvent(QFocusEvent *event)
+focusOutEvent(QFocusEvent *event)
}
Class diagram for KPtyProcess changes (QT6 child process modifier)classDiagram
class KPtyProcess {
+KPtyProcess(QObject *parent)
+KPtyProcess(int ptyMasterFd, QObject *parent)
+~KPtyProcess()
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+setChildProcessModifier(lambda)
#endif
}
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.
deepin pr auto review我来对这段代码变更进行审查:
改进建议:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEvent *event) override;
#else
void enterEvent(QEnterEvent *event) override; // 修正:EnterEvent -> QEnterEvent
#endif
这些修改主要是为了适配 Qt5 和 Qt6 之间的 API 变化,整体实现是合理的,只需要修正上述提到的小问题即可。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, lzwind 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 |
|
/merge |
-- Add code to adjust QT5
Log: add feature
Task: https://pms.uniontech.com/task-view-383493.html
Summary by Sourcery
Add Qt version checks to support both Qt5 and Qt6, adjusting child process modifiers and widget event handling accordingly.
Enhancements: