fix: replace QProcess with startDetached for calendar DBus call#375
Merged
Conversation
Changed the DBus call implementation from using QProcess with waitForFinished to QProcess::startDetached to prevent UI blocking. The previous implementation could cause the dock interface to freeze while waiting for the calendar application response. The new approach launches the DBus call asynchronously without blocking the main thread. Log: Fixed potential UI freeze when clicking calendar jump button Influence: 1. Test clicking the calendar jump button in dock 2. Verify calendar application opens without dock freezing 3. Check that multiple rapid clicks don't cause issues 4. Ensure calendar window raises properly via DBus call fix: 替换日历DBus调用中的QProcess为startDetached 将DBus调用实现从使用QProcess和waitForFinished改为使用 QProcess::startDetached,以防止UI阻塞。之前的实现在等待日历应用响应时可 能导致dock界面冻结。新方法以异步方式启动DBus调用,不会阻塞主线程。 Log: 修复点击日历跳转按钮时可能出现的UI冻结问题 Influence: 1. 测试dock中的日历跳转按钮点击功能 2. 验证日历应用打开时dock不会冻结 3. 检查多次快速点击不会导致问题 4. 确保通过DBus调用正确提升日历窗口 PMS: BUG-337385
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the calendar DBus launch to use QProcess::startDetached for non-blocking execution, replacing the previous synchronous QProcess setup and wait loop to eliminate UI freeze. Sequence diagram for asynchronous calendar DBus call on button clicksequenceDiagram
actor User
participant JumpCalendarButton
participant QProcess_startDetached
participant Calendar_Application
User->>JumpCalendarButton: Clicks jump button
JumpCalendarButton->>QProcess_startDetached: Launch dbus-send asynchronously
QProcess_startDetached->>Calendar_Application: DBus RaiseWindow call
Calendar_Application-->>User: Calendar window opens (no UI freeze)
Class diagram for updated JumpCalendarButton DBus call logicclassDiagram
class JumpCalendarButton {
+mouseReleaseEvent(QMouseEvent* event)
- (removed) QProcess process
- (removed) process.setProgram()
- (removed) process.setArguments()
- (removed) process.start()
- (removed) process.waitForFinished()
+ (added) QProcess::startDetached()
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
mhduiy
approved these changes
Oct 21, 2025
mhduiy
approved these changes
Oct 21, 2025
mhduiy
approved these changes
Oct 21, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, robertkill 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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the DBus call implementation from using QProcess with waitForFinished to QProcess::startDetached to prevent UI blocking. The previous implementation could cause the dock interface to freeze while waiting for the calendar application response. The new approach launches the DBus call asynchronously without blocking the main thread.
Log: Fixed potential UI freeze when clicking calendar jump button
Influence:
fix: 替换日历DBus调用中的QProcess为startDetached
将DBus调用实现从使用QProcess和waitForFinished改为使用
QProcess::startDetached,以防止UI阻塞。之前的实现在等待日历应用响应时可
能导致dock界面冻结。新方法以异步方式启动DBus调用,不会阻塞主线程。
Log: 修复点击日历跳转按钮时可能出现的UI冻结问题
Influence:
PMS: BUG-337385
Summary by Sourcery
Use QProcess::startDetached to asynchronously invoke the calendar DBus call and prevent UI blocking in the dock.
Bug Fixes:
Enhancements: