Skip to content

Commit c20fbb7

Browse files
committed
Merge #17939: gui: Remove warning "unused variable 'wallet_model'"
c279a81 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 bitcoin/bitcoin@c279a81 fanquake: ACK c279a81 - tested wallet loading/unloading in the qt rpc console. Tree-SHA512: 8fbd55c7e213599c7be843b52e960a16cf965b3e01489f426ac3ed9d579d78bb4b2ac230bcccd8abe0397a8b1166ee10e0d685738441a77a5dcb5135c15790fa
2 parents 2ddf041 + c279a81 commit c20fbb7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/qt/rpcconsole.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,8 @@ void RPCConsole::on_lineEdit_returnPressed()
905905

906906
cmdBeforeBrowsing = QString();
907907

908-
WalletModel* wallet_model{nullptr};
909908
#ifdef ENABLE_WALLET
910-
const int wallet_index = ui->WalletSelector->currentIndex();
911-
if (wallet_index > 0) {
912-
wallet_model = ui->WalletSelector->itemData(wallet_index).value<WalletModel*>();
913-
}
909+
WalletModel* wallet_model = ui->WalletSelector->currentData().value<WalletModel*>();
914910

915911
if (m_last_wallet_model != wallet_model) {
916912
if (wallet_model) {

0 commit comments

Comments
 (0)