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