mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 2a7c3bc498 into merged_master (Bitcoin PR #16436)
This commit is contained in:
commit
73e16e59db
1 changed files with 18 additions and 24 deletions
|
|
@ -25,7 +25,8 @@
|
|||
#ifdef ENABLE_WALLET
|
||||
#include <qt/paymentserver.h>
|
||||
#include <qt/walletcontroller.h>
|
||||
#endif
|
||||
#include <qt/walletmodel.h>
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
#include <interfaces/handler.h>
|
||||
#include <interfaces/node.h>
|
||||
|
|
@ -207,12 +208,6 @@ BitcoinApplication::~BitcoinApplication()
|
|||
|
||||
delete window;
|
||||
window = nullptr;
|
||||
#ifdef ENABLE_WALLET
|
||||
delete paymentServer;
|
||||
paymentServer = nullptr;
|
||||
delete m_wallet_controller;
|
||||
m_wallet_controller = nullptr;
|
||||
#endif
|
||||
delete optionsModel;
|
||||
optionsModel = nullptr;
|
||||
delete platformStyle;
|
||||
|
|
@ -328,25 +323,22 @@ void BitcoinApplication::initializeResult(bool success)
|
|||
{
|
||||
// Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
|
||||
qInfo() << "Platform customization:" << platformStyle->getName();
|
||||
#ifdef ENABLE_WALLET
|
||||
m_wallet_controller = new WalletController(m_node, platformStyle, optionsModel, this);
|
||||
#ifdef ENABLE_BIP70
|
||||
PaymentServer::LoadRootCAs();
|
||||
#endif
|
||||
if (paymentServer) {
|
||||
paymentServer->setOptionsModel(optionsModel);
|
||||
#ifdef ENABLE_BIP70
|
||||
//TODO(stevenroose) fix
|
||||
//connect(m_wallet_controller, &WalletController::coinsSent, paymentServer, &PaymentServer::fetchPaymentACK);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
clientModel = new ClientModel(m_node, optionsModel);
|
||||
window->setClientModel(clientModel);
|
||||
#ifdef ENABLE_WALLET
|
||||
window->setWalletController(m_wallet_controller);
|
||||
if (WalletModel::isWalletEnabled()) {
|
||||
m_wallet_controller = new WalletController(m_node, platformStyle, optionsModel, this);
|
||||
window->setWalletController(m_wallet_controller);
|
||||
if (paymentServer) {
|
||||
paymentServer->setOptionsModel(optionsModel);
|
||||
#ifdef ENABLE_BIP70
|
||||
PaymentServer::LoadRootCAs();
|
||||
//TODO(stevenroose) fix
|
||||
//connect(m_wallet_controller, &WalletController::coinsSent, paymentServer, &PaymentServer::fetchPaymentACK);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
// If -min option passed, start window minimized (iconified) or minimized to tray
|
||||
if (!gArgs.GetBoolArg("-min", false)) {
|
||||
|
|
@ -550,8 +542,10 @@ int GuiMain(int argc, char* argv[])
|
|||
|
||||
// Start up the payment server early, too, so impatient users that click on
|
||||
// bitcoin: links repeatedly have their payment requests routed to this process:
|
||||
app.createPaymentServer();
|
||||
#endif
|
||||
if (WalletModel::isWalletEnabled()) {
|
||||
app.createPaymentServer();
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
/// 9. Main GUI initialization
|
||||
// Install global event filter that makes sure that long tooltips can be word-wrapped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue