fix: use SIGNAL/SLOT macro for sigYUVFrame connect - #513
Conversation
Replace new-style connect with old-style SIGNAL/SLOT macro syntax for sigYUVFrame signal connection to ensure compatibility. 将sigYUVFrame信号连接从新式函数指针语法改为旧式SIGNAL/SLOT宏语法以确保兼容性。 Log: 修改sigYUVFrame连接方式为SIGNAL/SLOT宏语法 PMS: BUG-372435 Influence: 仅影响YUV帧信号连接方式,功能行为不变。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces a single new-style function-pointer Qt connect call for sigYUVFrame with the old-style SIGNAL/SLOT macro syntax to maintain compatibility, leaving behavior unchanged. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:40分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 修复步骤1:统一头文件中的信号与槽参数类型,避免编译期报错
// 在 MajorImageProcessingThread.h 中:
// signals:
// void sigYUVFrame(std::shared_ptr<uchar[]> data, unsigned int width, unsigned int height);
//
// 在 PreviewOpenglWidget.h 中:
// public slots:
// void slotShowYuv(std::shared_ptr<uchar[]> data, unsigned int width, unsigned int height);
void videowidget::delayInit()
{
if (m_imgPrcThread) {
connect(m_imgPrcThread, SIGNAL(SendMajorImageProcessing(QImage *, int)),
this, SLOT(ReceiveMajorImage(QImage *, int)));
connect(m_imgPrcThread, SIGNAL(sigRenderYuv(bool)), this, SLOT(ReceiveOpenGLstatus(bool)));
// 修复步骤2:使用 C++11 新式语法进行编译期类型检查,使用默认的 AutoConnection 保证线程安全
// 跨线程时 AutoConnection 会自动变为 QueuedConnection,将执行安全的投递到 UI 线程
connect(m_imgPrcThread, &MajorImageProcessingThread::sigYUVFrame,
m_openglwidget, &PreviewOpenglWidget::slotShowYuv);
}
} |
|
@add-uos: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, 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 |
Replace new-style connect with old-style SIGNAL/SLOT macro syntax for sigYUVFrame signal connection to ensure compatibility.
将sigYUVFrame信号连接从新式函数指针语法改为旧式SIGNAL/SLOT宏语法以确保兼容性。
Log: 修改sigYUVFrame连接方式为SIGNAL/SLOT宏语法
PMS: BUG-372435
Influence: 仅影响YUV帧信号连接方式,功能行为不变。
Summary by Sourcery
Bug Fixes: