GUI: 完整筛选 6 维度、简化还原界面、修复加密/压缩自动打包#41
Merged
Merged
Conversation
GUI filter: - Add name glob filter (include/exclude) to FilterDialog - Add all 6 filter dimensions as inline controls in BackupTab: path (text), type (text), name (text), time (datetime picker), size (spin+unit), owner (text) - FilterDialog now syncs to/from all inline controls bidirectionally - collectOptions() forwards all 6 dimensions to BackupOptions Settings tab removed: settings_tab.cpp/.h deleted, references removed from main_window, CMakeLists.txt, qrc, and settings icon. Only backup, restore, and schedule tabs remain. Co-Authored-By: Claude <noreply@anthropic.com>
Restore tab was missing decryption algorithm selector and password field. Add enableDecrypt checkbox, decryptAlgo combobox (AES-256/SM4), and password line edit, matching the backup tab layout. Forward decrypt options to RestoreOptions in onStartRestore(). Co-Authored-By: Claude <noreply@anthropic.com>
When user picks a destination dir (e.g. 'data'), the GUI now automatically creates a timestamped subdirectory inside it: data/source_20260715_143000/ (backup) data/source_R20260715_143000/ (restore) This matches the behavior that was removed from CLI by the revert of #28. GUI-only fix — no CLI changes. Co-Authored-By: Claude <noreply@anthropic.com>
The engine handles directory creation for both mirror mode (fs_->mkdir) and archive mode (fs_->write). Pre-creating the directory in GUI caused an empty directory to remain alongside the .tar file when pack mode was enabled. Co-Authored-By: Claude <noreply@anthropic.com>
…collect
Two bugs fixed:
1. collectOptions() was missing the encrypt block entirely —
opts.encryptAlgo and opts.password were never set.
2. GUI display names 'AES-256' and 'SM4' didn't match
buildEncryptor expectations ('aes256', 'sm4').
Same fix applied to restore tab's decryptAlgo mapping.
Co-Authored-By: Claude <noreply@anthropic.com>
Mirror the backup tab's encrypt-password validation: require non-empty password when decrypt is enabled. Co-Authored-By: Claude <noreply@anthropic.com>
- Remove decrypt algorithm combobox and enableDecrypt checkbox - Only show password field (always visible) - Auto-detect encryption from .enc filename suffix - Encrypted file without password → prompt user - BackupWorker auto-tries AES-256 first, falls back to SM4 - No need for user to select encryption algorithm manually Co-Authored-By: Claude <noreply@anthropic.com>
Restore tab now only shows source, destination, and password. All format/algorithm detection is automatic: - Parse filename extension chain right-to-left .enc → decrypt (auto-try AES→SM4) .gz → decompress gzip .zst → decompress zstd .xz → decompress lzma .tar → unpack tar .zip → unpack zip Example: docs_20260715.tar.xz.enc → decrypt→lzma→tar No manual algo selection needed anymore. Co-Authored-By: Claude <noreply@anthropic.com>
onCancel was connected to finished() but ignored the success parameter — always showed '还原完成' and emitted success=true. Renamed to onRestoreFinished(bool success, QString const& msg) that handles errors correctly: wrong password now shows '还原失败: ✗ Decryption failed — wrong password or corrupted data' without progress bar animation. Co-Authored-By: Claude <noreply@anthropic.com>
Only switch to backup tab on restore success. On failure, stay on restore tab so user can fix password and retry. Co-Authored-By: Claude <noreply@anthropic.com>
Encryption operates on a single file, not a directory. When user enables encryption without pack, auto-enable Tar packing to produce a valid .tar.enc file. Co-Authored-By: Claude <noreply@anthropic.com>
RestoreOptions::preserveMetadata and handleSpecial are dead fields — handleRestore and RestoreEngine never use them. Removed the misleading checkboxes from restore tab. Co-Authored-By: Claude <noreply@anthropic.com>
Compression also operates on a single file, not a directory. Auto-enable Tar packing when user enables compression without pack, same as encryption. Co-Authored-By: Claude <noreply@anthropic.com>
Compress/Encrypt auto-enable Tar packing immediately when the user checks the box, via onCompressToggled/onEncryptToggled slots, rather than validating at start time. Co-Authored-By: Claude <noreply@anthropic.com>
…as selected Compress and encrypt now force the pack format to Tar, switching away from Zip if previously selected. Co-Authored-By: Claude <noreply@anthropic.com>
…pack Guard against edge case where user manually unchecks pack after auto-toggle. Shows clear error message instead of running a mirror backup and then failing at compress/encrypt step. Co-Authored-By: Claude <noreply@anthropic.com>
…trols Added setters to FilterDialog for types, time, size, and owner. onEditFilter() pre-fills them before showing dialog, so user's inline settings are not lost when opening the dialog. Co-Authored-By: Claude <noreply@anthropic.com>
Path matching uses FNM_PATHNAME where * doesn't match / Explains common patterns: core, core/*, core/**/*, *.cpp Co-Authored-By: Claude <noreply@anthropic.com>
When user enters a path without glob chars (e.g. 'core'), GUI now generates recursive patterns: core, core/*, core/*/*, ... up to 15 levels deep. This matches user expectation that including a directory includes everything inside it. Co-Authored-By: Claude <noreply@anthropic.com>
…lter Type filter is for OS file types (file/dir/symlink), not file extensions (.txt, .cpp). Updated placeholder and tooltip to guide users to the name filter for suffix-based filtering. Co-Authored-By: Claude <noreply@anthropic.com>
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.
改动范围
全部在
src/gui/,未动 CLI/Engine/Filter。筛选功能
core→ 包含所有子文件)还原界面
备份界面
其他