fix: move fallback timer stop to after page show completes#3303
Conversation
1. Remove m_showFallbackTimer->stop() from waitShowPage() and doShowPage() entry, move it to doShowPage() after all return statements so the timer is only stopped when the page has successfully been shown. 2. This prevents the fallback mechanism from being interrupted when the user quickly clicks the control center icon after logout, fixing the issue where the control center fails to open. Log: Fixed control center failing to open after quick click post-logout. Influence: 1. Logout and quickly click the control center icon on the taskbar repeatedly to verify it opens successfully each time. 2. Test the same scenario on both X11 and Wayland sessions. PMS: BUG-366579 fix: 将 fallback 定时器停止移至页面展示完成后 1. 从 waitShowPage() 和 doShowPage() 开头移除 m_showFallbackTimer->stop(),将其移至 doShowPage() 所有 return 语句之后,确保只有在页面成功展示后才停止定时器。 2. 这防止了在快速点击任务栏控制中心图标后,fallback 机制被提前打断, 解决了注销后控制中心打开失败的问题。 Log: 修复注销后快速点击控制中心图标打开失败的问题。 Influence: 1. 注销后快速连续点击任务栏上的控制中心图标,验证每次都能 正常打开。 2. 分别在 X11 和 Wayland 会话下测试上述场景。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the control center page display flow so the fallback timer is only stopped after a page has successfully finished showing, preventing premature cancellation of the fallback mechanism when users rapidly open the control center after logout. Sequence diagram for updated control center page show and fallback timersequenceDiagram
actor User
participant TaskbarIcon
participant DccManager
participant m_showFallbackTimer
participant Page
User->>TaskbarIcon: click()
TaskbarIcon->>DccManager: waitShowPage(url, message)
DccManager->>DccManager: clearShowParam()
Note over DccManager,m_showFallbackTimer: m_showFallbackTimer is NOT stopped here anymore
DccManager->>DccManager: doShowPage(obj, cmd)
DccManager->>Page: [show page]
Page-->>DccManager: [page shown successfully]
DccManager->>m_showFallbackTimer: stop()
Note over DccManager,m_showFallbackTimer: Fallback timer stopped only after successful show
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码逻辑已经非常完善,以下为增强可读性的微调示例(添加注释)
void DccManager::doShowPage(QPointer<DccObject> obj, const QString &cmd)
{
if (m_plugins->isDeleting() || !obj) {
return;
}
qCInfo(dccLog) << "ShowPage:" << obj << "have cmd:" << !cmd.isEmpty();
// ... 中间执行了大量页面跳转、数据加载和信号触发逻辑
if (triggeredObjectsUpdated)
Q_EMIT triggeredObjectsChanged(m_triggeredObjects);
// 页面展示及信号发送均已完成,此时停止兜底定时器
m_showFallbackTimer->stop();
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, mhduiy 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log: Fixed control center failing to open after quick click post-logout.
Influence:
PMS: BUG-366579
fix: 将 fallback 定时器停止移至页面展示完成后
Log: 修复注销后快速点击控制中心图标打开失败的问题。
Influence:
Summary by Sourcery
Bug Fixes: