Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include "bitcoingui.h" | #include <qt/bitcoingui.h> | ||||
#include "chainparams.h" | #include <chainparams.h> | ||||
#include "clientmodel.h" | #include <config.h> | ||||
#include "config.h" | #include <httprpc.h> | ||||
#include "guiconstants.h" | #include <init.h> | ||||
#include "guiutil.h" | #include <interfaces/handler.h> | ||||
#include "httprpc.h" | #include <interfaces/node.h> | ||||
#include "intro.h" | #include <qt/clientmodel.h> | ||||
#include "networkstyle.h" | #include <qt/guiconstants.h> | ||||
#include "optionsmodel.h" | #include <qt/guiutil.h> | ||||
#include "platformstyle.h" | #include <qt/intro.h> | ||||
#include "splashscreen.h" | #include <qt/networkstyle.h> | ||||
#include "utilitydialog.h" | #include <qt/optionsmodel.h> | ||||
#include "winshutdownmonitor.h" | #include <qt/platformstyle.h> | ||||
#include <qt/splashscreen.h> | |||||
#include <qt/utilitydialog.h> | |||||
#include <qt/winshutdownmonitor.h> | |||||
#include <rpc/server.h> | |||||
#include <ui_interface.h> | |||||
#include <uint256.h> | |||||
#include <util.h> | |||||
#include <walletinitinterface.h> | |||||
#include <warnings.h> | |||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#include "paymentserver.h" | #include <qt/paymentserver.h> | ||||
#include "walletmodel.h" | #include <qt/walletmodel.h> | ||||
#endif | #endif | ||||
#include "init.h" | |||||
#include "interfaces/handler.h" | |||||
#include "interfaces/node.h" | |||||
#include "rpc/server.h" | |||||
#include "ui_interface.h" | |||||
#include "uint256.h" | |||||
#include "util.h" | |||||
#include "warnings.h" | |||||
#ifdef ENABLE_WALLET | |||||
#include "wallet/wallet.h" | |||||
#endif | |||||
#include "walletinitinterface.h" | |||||
#include <cstdint> | |||||
#include <boost/filesystem/operations.hpp> | #include <boost/filesystem/operations.hpp> | ||||
#include <boost/thread.hpp> | #include <boost/thread.hpp> | ||||
#include <QApplication> | #include <QApplication> | ||||
#include <QDebug> | #include <QDebug> | ||||
#include <QLibraryInfo> | #include <QLibraryInfo> | ||||
#include <QLocale> | #include <QLocale> | ||||
#include <QMessageBox> | #include <QMessageBox> | ||||
Show All 12 Lines | |||||
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); | Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); | ||||
#elif defined(QT_QPA_PLATFORM_WINDOWS) | #elif defined(QT_QPA_PLATFORM_WINDOWS) | ||||
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); | Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); | ||||
#elif defined(QT_QPA_PLATFORM_COCOA) | #elif defined(QT_QPA_PLATFORM_COCOA) | ||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); | Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); | ||||
#endif | #endif | ||||
#endif | #endif | ||||
#include <cstdint> | |||||
// Declare meta types used for QMetaObject::invokeMethod | // Declare meta types used for QMetaObject::invokeMethod | ||||
Q_DECLARE_METATYPE(bool *) | Q_DECLARE_METATYPE(bool *) | ||||
Q_DECLARE_METATYPE(Amount) | Q_DECLARE_METATYPE(Amount) | ||||
Q_DECLARE_METATYPE(uint256) | Q_DECLARE_METATYPE(uint256) | ||||
// Config is non-copyable so we can only register pointers to it | // Config is non-copyable so we can only register pointers to it | ||||
Q_DECLARE_METATYPE(Config *) | Q_DECLARE_METATYPE(Config *) | ||||
▲ Show 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
clientModel = new ClientModel(m_node, optionsModel); | clientModel = new ClientModel(m_node, optionsModel); | ||||
window->setClientModel(clientModel); | window->setClientModel(clientModel); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
bool fFirstWallet = true; | bool fFirstWallet = true; | ||||
auto wallets = m_node.getWallets(); | auto wallets = m_node.getWallets(); | ||||
auto cwallet = ::vpwallets.begin(); | |||||
for (auto &wallet : wallets) { | for (auto &wallet : wallets) { | ||||
WalletModel *const walletModel = new WalletModel( | WalletModel *const walletModel = new WalletModel( | ||||
std::move(wallet), m_node, platformStyle, *cwallet++, optionsModel); | std::move(wallet), m_node, platformStyle, optionsModel); | ||||
window->addWallet(walletModel); | window->addWallet(walletModel); | ||||
if (fFirstWallet) { | if (fFirstWallet) { | ||||
window->setCurrentWallet(walletModel->getWalletName()); | window->setCurrentWallet(walletModel->getWalletName()); | ||||
fFirstWallet = false; | fFirstWallet = false; | ||||
} | } | ||||
connect( | connect( | ||||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |