HomePhabricator

Qt/GUI only: Migrate GUI settings from Bitcoin Core's settings file to our own…

Description

Qt/GUI only: Migrate GUI settings from Bitcoin Core's settings file to our own file

Summary:
This diff finishes up the transition to the Qt GUI app name to 'BitcoinABC'.

Since Qt stores settings files based on Qt App name and organization name,
changing the app name to BitcoinABC and the organization to 'bitcoincash.org'
has the side-effect of making the GUI Qt app use a different settings file
location on all platforms.

Since this can produce unexpected results for users upgrading from
Bitcoin ABC 0.14.6 (or perhaps even Core), I added a settings migration
mechanism which copies settings from Core/BitcoinABC-0.14.6 -> our new
settings location *only* if settings exist in the old location and not
in the new location.

Note that this is for GUI settings only and doesn't affect things like
the conf file -- although the GUI does have its own concept of where the
data dir is which basically overrides the conf file spec.

Note that this diff basically makes the GUI settings be BitcoinABC
specific and as such bitcoin classic or BU GUI settings will not be
shared anymore, if they ever were (I actually don't know if classic or BU
use Core's old GUI settings file location -- I presume they don't!).

Test Plan:
I was unable to write a test case for this as the code in question
doesn't even get compiled in test setup. What I did was I compiled the app
for OSX, Linux, and Windows and verified that settings were copied correctly
to the new settings file locations/registry keys and that settings were
never erroneously copied or clobbered.

The logic in this diff is fairly trivial so I don't think it necessarily
warrants a test case anyway considering the great difficulty involved in
mutating the test suite to support testing this.

If you like, build the GUI yourself first without this diff to produce
a settings file/registry entry then build it with this diff and see
the settings got copied over.

Reviewers: freetrader, deadalnix, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: zander, sickpig

Differential Revision: https://reviews.bitcoinabc.org/D513

Details

Provenance
CCulianuAuthored on Aug 31 2017, 06:54
CCulianuPushed on Aug 31 2017, 18:30
Reviewer
Restricted Project
Differential Revision
D513: Qt/GUI only: Migrate GUI settings from Bitcoin Core's settings file to our own file
Parents
rABC12c8a2426d36: Fix ZMQ test occasional hang and modernize it
Branches
Unknown
Tags
Unknown