mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
remove NotifyWatchonlyChanged
The signal is never called.
This commit is contained in:
@@ -45,7 +45,6 @@ WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, ClientModel
|
||||
optionsModel(client_model.getOptionsModel()),
|
||||
timer(new QTimer(this))
|
||||
{
|
||||
fHaveWatchOnly = false;
|
||||
addressTableModel = new AddressTableModel(this);
|
||||
transactionTableModel = new TransactionTableModel(platformStyle, this);
|
||||
recentRequestsTableModel = new RecentRequestsTableModel(this);
|
||||
@@ -141,12 +140,6 @@ void WalletModel::updateAddressBook(const QString &address, const QString &label
|
||||
addressTableModel->updateEntry(address, label, isMine, purpose, status);
|
||||
}
|
||||
|
||||
void WalletModel::updateWatchOnlyFlag(bool fHaveWatchonly)
|
||||
{
|
||||
fHaveWatchOnly = fHaveWatchonly;
|
||||
Q_EMIT notifyWatchonlyChanged(fHaveWatchonly);
|
||||
}
|
||||
|
||||
bool WalletModel::validateAddress(const QString& address) const
|
||||
{
|
||||
return IsValidDestinationString(address.toStdString());
|
||||
@@ -405,13 +398,6 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int
|
||||
assert(invoked);
|
||||
}
|
||||
|
||||
static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly)
|
||||
{
|
||||
bool invoked = QMetaObject::invokeMethod(walletmodel, "updateWatchOnlyFlag", Qt::QueuedConnection,
|
||||
Q_ARG(bool, fHaveWatchonly));
|
||||
assert(invoked);
|
||||
}
|
||||
|
||||
static void NotifyCanGetAddressesChanged(WalletModel* walletmodel)
|
||||
{
|
||||
bool invoked = QMetaObject::invokeMethod(walletmodel, "canGetAddressesChanged");
|
||||
@@ -426,7 +412,6 @@ void WalletModel::subscribeToCoreSignals()
|
||||
m_handler_address_book_changed = m_wallet->handleAddressBookChanged(std::bind(NotifyAddressBookChanged, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
|
||||
m_handler_transaction_changed = m_wallet->handleTransactionChanged(std::bind(NotifyTransactionChanged, this, std::placeholders::_1, std::placeholders::_2));
|
||||
m_handler_show_progress = m_wallet->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2));
|
||||
m_handler_watch_only_changed = m_wallet->handleWatchOnlyChanged(std::bind(NotifyWatchonlyChanged, this, std::placeholders::_1));
|
||||
m_handler_can_get_addrs_changed = m_wallet->handleCanGetAddressesChanged(std::bind(NotifyCanGetAddressesChanged, this));
|
||||
}
|
||||
|
||||
@@ -438,7 +423,6 @@ void WalletModel::unsubscribeFromCoreSignals()
|
||||
m_handler_address_book_changed->disconnect();
|
||||
m_handler_transaction_changed->disconnect();
|
||||
m_handler_show_progress->disconnect();
|
||||
m_handler_watch_only_changed->disconnect();
|
||||
m_handler_can_get_addrs_changed->disconnect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user