Repository navigation
#3838 notes: defer autosave during external-change review - #3842
Merged
Merged
Conversation
Owner
|
I think it's not a complete fix for the issue #3838, but at least a start. Thank you very much. |
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.
Summary
With checksum checks disabled, the external-change dialog's nested event loop lets autosave overwrite the external file before the user chooses Reload or Keep. Reload then reads back the overwritten text.
Defer only the current note's dirty row while the dialog is executing and visible. Other dirty notes still save. A scoped flag releases the deferral when the dialog event loop returns, including Qt5 quit paths that leave the widget visible. Initialize the dialog result to
Unsetso exiting without clicking a button cannot read an indeterminate action.Validation:
just nix-build(Qt6/KDE),just nix-build-qt5(qmake), andjust src-testpassed. QtTest reported 606 passed, zero failed/skipped across 20 suites. New unit rows cover the static dirty-note filter under both checksum settings, background saves, retained pending text, and saving after loading the external file.libQt5Core.so.5; its quit test used no compatibility shim. A separate Qt6 run with Qt5's quit-to-exit behavior interposed also passed.The unit tests exercise the dirty-note filter; real-application probes exercise the dialog wiring. Validation supplied an empty
.shared/common.justimport absent from a clean clone; selected recipes were unchanged. Native Windows and macOS were not run.Scope and remaining behavior:
Checklist
mainfrom a separate feature branch.Related issue
Related to #3838.