Add automatic snapshot capture on sandbox close - #5493
Add automatic snapshot capture on sandbox close#5493love-code-yeyixiao wants to merge 5 commits into
Conversation
在 `OptionsWindow.ui` 中新增复选框 `chkAutoSnapCapture`,用于在最后一个沙盒进程终止时自动捕获快照,并调整相关控件的位置和属性。更新全局设置以保存该选项。 在 `SandMan.cpp` 的 `OnBoxClosed` 函数中添加对 `AutoSnapCapture` 的检查,确保在沙盒关闭时自动捕获快照并记录日志。 在 `OptionsGeneral.cpp` 中更新 `LoadGeneral` 和 `SaveGeneral` 函数,以加载和保存 `AutoSnapCapture` 选项的设置。
在 `OptionsWindow.ui` 文件中,多个控件的行号进行了调整,以改善界面布局和用户体验。具体包括 `verticalSpacer_2`、`horizontalSpacer_4`、`chkRawDiskNotify`、`chkRawDiskRead` 和 `chkAllowEfs` 的行号变化。 在 `OptionsGeneral.cpp` 文件中,新增了对 `chkAutoSnapCapture` 复选框的信号连接,以便在用户点击时触发 `OnGeneralChanged` 槽函数,更新界面状态。
ee85d32 to
bf5091e
Compare
|
please resove the conflict with the latest code base |
|
@love-code-yeyixiao When |
Enhanced `CSandMan::OnBoxClosed` to include an auto-snapshot mechanism via a new `TakeAutoSnap` lambda function. Updated `OpenRecovery` to support an additional `pbTakeSnapshot` parameter, enabling snapshots after recovery. Adjusted relevant UI and logic in `RecoveryWindow` to integrate snapshot functionality with delete operations.
|
it now works well on my Win11 VM. |
|
I found two failure-path problems in
The fix checks and reports the snapshot result, aborts deletion on failure, preserves automatic capture when no recovery dialog is needed, and lets the dialog's primary/dropdown choice decide whether a snapshot is taken when the dialog is shown. I verified the cancel, empty-dialog, plain-delete, capture-success, and capture-failure branches with an actual-source regression harness; the PR UI also parses successfully with Qt 6.8.3 |
In
OptionsWindow.ui, add a new checkboxchkAutoSnapCaptureto automatically capture a snapshot when the last sandbox process terminates, and adjust the position and properties of related controls. Update the global settings to save this option.In the
OnBoxClosedfunction inSandMan.cpp, add a check forAutoSnapCaptureto ensure that a snapshot is automatically captured and logged when the sandbox closes.In
OptionsGeneral.cpp, update theLoadGeneralandSaveGeneralfunctions to load and save theAutoSnapCaptureoption settings.