aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-07 16:46:58 +0000
committerSjors Provoost <sjors@sprovoost.nl>2020-01-16 14:27:43 +0100
commitc279a81e9c7dc3386e929ff8b635e7a0de9c20c5 (patch)
tree8525d4f2d16018e2eadbc6a790e873ceb68e99a8 /src/qt/rpcconsole.cpp
parent4e8b564df0d4ff2bc2463aa072b15471361d9e7d (diff)
gui: Remove warning "unused variable 'wallet_model'"
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-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) {