| 37 | using wallet::WALLET_FLAG_EXTERNAL_SIGNER; |
| 38 | |
| 39 | WalletController::WalletController(ClientModel& client_model, const PlatformStyle* platform_style, QObject* parent) |
| 40 | : QObject(parent) |
| 41 | , m_activity_thread(new QThread(this)) |
| 42 | , m_activity_worker(new QObject) |
| 43 | , m_client_model(client_model) |
| 44 | , m_node(client_model.node()) |
| 45 | , m_platform_style(platform_style) |
| 46 | , m_options_model(client_model.getOptionsModel()) |
| 47 | { |
| 48 | m_handler_load_wallet = m_node.walletLoader().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { |
| 49 | getOrCreateWallet(std::move(wallet)); |
| 50 | }); |
| 51 | |
| 52 | m_activity_worker->moveToThread(m_activity_thread); |
| 53 | m_activity_thread->start(); |
| 54 | QTimer::singleShot(0, m_activity_worker, []() { |
| 55 | util::ThreadRename("qt-walletctrl"); |
| 56 | }); |
| 57 | } |
| 58 | |
| 59 | // Not using the default destructor because not all member types definitions are |
| 60 | // available in the header, just forward declared. |
nothing calls this directly
no test coverage detected