| 94 | } |
| 95 | |
| 96 | void WalletController::closeAllWallets(QWidget* parent) |
| 97 | { |
| 98 | QMessageBox::StandardButton button = QMessageBox::question(parent, tr("Close all wallets"), |
| 99 | tr("Are you sure you wish to close all wallets?"), |
| 100 | QMessageBox::Yes|QMessageBox::Cancel, |
| 101 | QMessageBox::Yes); |
| 102 | if (button != QMessageBox::Yes) return; |
| 103 | |
| 104 | QMutexLocker locker(&m_mutex); |
| 105 | for (WalletModel* wallet_model : m_wallets) { |
| 106 | wallet_model->wallet().remove(); |
| 107 | Q_EMIT walletRemoved(wallet_model); |
| 108 | delete wallet_model; |
| 109 | } |
| 110 | m_wallets.clear(); |
| 111 | } |
| 112 | |
| 113 | WalletModel* WalletController::getOrCreateWallet(std::unique_ptr<interfaces::Wallet> wallet) |
| 114 | { |
no test coverage detected