aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-01-17 15:52:40 +0800
committerfanquake <fanquake@gmail.com>2020-01-17 16:10:05 +0800
commitc20fbb7be864bb7652280d5855be89b6b04cdfd1 (patch)
tree91a58b0a2d44a75733424d93574dd27c690b7bd5 /src/qt
parent2ddf041a8d5e2c9251da19c4b14259c1d318a442 (diff)
parentc279a81e9c7dc3386e929ff8b635e7a0de9c20c5 (diff)
Merge #17939: gui: Remove warning "unused variable 'wallet_model'"
c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 gui: Remove warning "unused variable 'wallet_model'" (João Barbosa) Pull request description: This was part of the abandoned #15150. ACKs for top commit: theStack: utACK https://github.com/bitcoin/bitcoin/pull/17939/commits/c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 fanquake: ACK c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 - tested wallet loading/unloading in the qt rpc console. Tree-SHA512: 8fbd55c7e213599c7be843b52e960a16cf965b3e01489f426ac3ed9d579d78bb4b2ac230bcccd8abe0397a8b1166ee10e0d685738441a77a5dcb5135c15790fa
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/rpcconsole.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 3dd64c5273..31c9e65140 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -905,12 +905,8 @@ void RPCConsole::on_lineEdit_returnPressed()
cmdBeforeBrowsing = QString();
- WalletModel* wallet_model{nullptr};
#ifdef ENABLE_WALLET
- const int wallet_index = ui->WalletSelector->currentIndex();
- if (wallet_index > 0) {
- wallet_model = ui->WalletSelector->itemData(wallet_index).value<WalletModel*>();
- }
+ WalletModel* wallet_model = ui->WalletSelector->currentData().value<WalletModel*>();
if (m_last_wallet_model != wallet_model) {
if (wallet_model) {