remove NotifyWatchonlyChanged

The signal is never called.
This commit is contained in:
MarcoFalke committed 2025-05-09 15:03:08 +02:00
1 parent fa62a013a5
commit ffff949472
8 files changed
-41

No files matched your search

-3
View File
@@ -243,9 +243,6 @@ void TransactionView::setModel(WalletModel *_model)
// hide column Watch-only
updateWatchOnlyColumn(false);
// Watch-only signal
connect(_model, &WalletModel::notifyWatchonlyChanged, this, &TransactionView::updateWatchOnlyColumn);
}
}
-16
View File
@@ -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();
}
-7
View File
@@ -162,12 +162,10 @@ private:
std::unique_ptr<interfaces::Handler> m_handler_address_book_changed;
std::unique_ptr<interfaces::Handler> m_handler_transaction_changed;
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
std::unique_ptr<interfaces::Handler> m_handler_watch_only_changed;
std::unique_ptr<interfaces::Handler> m_handler_can_get_addrs_changed;
ClientModel* m_client_model;
interfaces::Node& m_node;
bool fHaveWatchOnly;
bool fForceCheckBalanceChanged{false};
// Wallet has an options model for wallet-specific options
@@ -211,9 +209,6 @@ Q_SIGNALS:
// Show progress dialog e.g. for rescan
void showProgress(const QString &title, int nProgress);
// Watch-only address added
void notifyWatchonlyChanged(bool fHaveWatchonly);
// Signal that wallet is about to be removed
void unload();
@@ -232,8 +227,6 @@ public Q_SLOTS:
void updateTransaction();
/* New, updated or removed address book entry */
void updateAddressBook(const QString &address, const QString &label, bool isMine, wallet::AddressPurpose purpose, int status);
/* Watch-only added */
void updateWatchOnlyFlag(bool fHaveWatchonly);
/* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
void pollBalanceChanged();
};