Skip to content

qml: Fix onboarding data directory failures - #864

Open
johnny9 wants to merge 3 commits into
bitcoin-core:qt6from
johnny9:fix-onboarding-top3
Open

qml: Fix onboarding data directory failures#864
johnny9 wants to merge 3 commits into
bitcoin-core:qt6from
johnny9:fix-onboarding-top3

Conversation

@johnny9

@johnny9 johnny9 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Depends on #812.

This branch is based on the current head of #812. Until #812 merges, this pull request also includes that commit.

This fixes three onboarding failures:

  • Show the data directory chooser when a saved data directory cannot be accessed. Config read errors now return a startup error instead of aborting.
  • Use a Qt 6.2-compatible folder dialog while keeping the Qt 6.5 and newer implementation.
  • Validate explicit data directories before onboarding. Resolve valid relative paths from the current directory and report invalid paths through normal startup error handling.

Tests:

  • Added unit tests for unreadable saved directories, config read errors, invalid explicit directories, and valid relative directories.
  • Added a QML contract test for both folder dialog implementations.
  • Focused OptionsModel tests pass: 6 passed.
  • Full QML test target passes.
  • Application and test targets build.
  • Memory-safety policy scan reports no new findings in changed lines.

Fixes #775.
Fixes #783.
Fixes #846.

@johnny9
johnny9 force-pushed the fix-onboarding-top3 branch from 8b425d4 to 2f0b943 Compare August 18, 2026 02:08
@johnny9
johnny9 marked this pull request as ready for review August 18, 2026 03:04
@johnny9
johnny9 force-pushed the fix-onboarding-top3 branch from 2f0b943 to af67176 Compare August 20, 2026 00:49
jarolrod and others added 3 commits August 25, 2026 01:36
Keep the datadir selected in onboarding separate from the path Core resolves after config parsing. Run pre-init preview and apply through a scratch ArgsManager seeded from the original argv so live gArgs reaches InitConfig without preloaded config or settings state.

Finalize onboarding settings after InitConfig and chain-specific QSettings setup. Apply reset across Core and GUI stores transactionally, preserve strDataDir, honor final source precedence, and recover unreadable settings with the Qt reset-or-abort behavior.

Only open and synchronize settings stores that are used or modified, preserving rollback without allowing unrelated stores to block startup. Add unit and functional coverage for datadir precedence, reset behavior, recovery, persistence, and rollback.
@johnny9
johnny9 force-pushed the fix-onboarding-top3 branch from af67176 to 1db6db4 Compare August 25, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants