Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/plugin-qt/power/session/powermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1466,13 +1466,7 @@ void PowerManager::scheduledShutdown(int state)
}
case SchedCountdowning: {
m_shutdownStatus = SchedCountdowning;
// 用实际剩余时间做倒计时起点,避免切换会话重新调度后从头倒数
qint64 secsLeft = now.secsTo(next);
if (secsLeft < 1)
secsLeft = 1;
else if (secsLeft > m_shutdownCountdown)
secsLeft = m_shutdownCountdown;
int remaining = static_cast<int>(secsLeft);
int remaining = qMax(1, m_shutdownCountdown);
shutdownCountdownNotify(remaining, true);

// Use member m_countdownTimer (matching Go: m.shutdownTimer in countdown goroutine)
Expand Down
Loading