diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-05-24 10:36:52 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-05-24 10:48:27 +0200 |
commit | 136863443300752e7a5b5b4e7b20219bd932ace3 (patch) | |
tree | 1ab62ac8c6f8a2b126482fba1286ab0b6a807d06 /src/qt/bitcoin.cpp | |
parent | aa5cd3cc6d47e8c372cbdc5b05dab717fed828c8 (diff) | |
parent | 31122aa979c4c9a40e276cfc44243420c367ba4f (diff) | |
download | bitcoin-136863443300752e7a5b5b4e7b20219bd932ace3.tar.xz |
Merge bitcoin-core/gui#601: refactor: Pass interfaces::Node references to OptionsModel constructor
31122aa979c4c9a40e276cfc44243420c367ba4f refactor: Pass interfaces::Node references to OptionsModel constructor (Ryan Ofsky)
Pull request description:
Giving OptionsModel access to the node interface is needed as part of #602 to get bitcoind and bitcoin-qt to use the same settings instead of different settings.
It has been split off from #602 to simplify that PR. Previously these commits were part of bitcoin/bitcoin#15936 and also had some review discussion there.
ACKs for top commit:
promag:
Code review ACK 31122aa979c4c9a40e276cfc44243420c367ba4f.
furszy:
Code ACK 31122aa9
jarolrod:
ACK 31122aa979c4c9a40e276cfc44243420c367ba4f
Tree-SHA512: b8529322fd7ba97e19864129e6cf5f9acc58c124f2e5a7c50aca15772c8549de3c24e8b0c27e8cf2c06fd26529e9cdb898b0788a1de3cbfdfbdd3f85c9f0fe69
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r-- | src/qt/bitcoin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index fa45e3908a..53fbac0106 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -261,7 +261,7 @@ void BitcoinApplication::createPaymentServer() void BitcoinApplication::createOptionsModel(bool resetSettings) { - optionsModel = new OptionsModel(this, resetSettings); + optionsModel = new OptionsModel(node(), this, resetSettings); } void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) @@ -292,7 +292,6 @@ void BitcoinApplication::createNode(interfaces::Init& init) { assert(!m_node); m_node = init.makeNode(); - if (optionsModel) optionsModel->setNode(*m_node); if (m_splash) m_splash->setNode(*m_node); } @@ -635,6 +634,12 @@ int GuiMain(int argc, char* argv[]) // Allow parameter interaction before we create the options model app.parameterSetup(); GUIUtil::LogQtInfo(); + + if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false)) + app.createSplashScreen(networkStyle.data()); + + app.createNode(*init); + // Load GUI settings from QSettings app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); @@ -643,11 +648,6 @@ int GuiMain(int argc, char* argv[]) app.InitPruneSetting(prune_MiB); } - if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false)) - app.createSplashScreen(networkStyle.data()); - - app.createNode(*init); - int rv = EXIT_SUCCESS; try { |