mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-12 09:37:47 +00:00
MainWindow: fix potential segfault
This commit is contained in:
parent
808fd94f2a
commit
58b927f9a3
2 changed files with 7 additions and 2 deletions
|
@ -358,13 +358,13 @@ void MainWindow::initWalletContext() {
|
|||
connect(m_ctx.get(), &AppContext::customRestoreHeightSet, this, &MainWindow::onCustomRestoreHeightSet);
|
||||
|
||||
// Nodes
|
||||
connect(m_ctx->nodes, &Nodes::updateStatus, [=](const QString &msg){this->setStatusText(msg);});
|
||||
connect(m_ctx->nodes, &Nodes::updateStatus, this, &MainWindow::onSetStatusText);
|
||||
connect(m_ctx->nodes, &Nodes::nodeExhausted, this, &MainWindow::showNodeExhaustedMessage);
|
||||
connect(m_ctx->nodes, &Nodes::WSNodeExhausted, this, &MainWindow::showWSNodeExhaustedMessage);
|
||||
|
||||
// Wallet
|
||||
connect(m_ctx->wallet.get(), &Wallet::connectionStatusChanged, this, &MainWindow::onConnectionStatusChanged);
|
||||
connect(m_ctx->wallet.get(), &Wallet::currentSubaddressAccountChanged, [this]{this->updateTitle();});
|
||||
connect(m_ctx->wallet.get(), &Wallet::currentSubaddressAccountChanged, this, &MainWindow::updateTitle);
|
||||
}
|
||||
|
||||
void MainWindow::startupWarning() {
|
||||
|
@ -498,6 +498,10 @@ void MainWindow::onBalanceUpdated(quint64 balance, quint64 spendable) {
|
|||
m_balanceWidget->setHidden(hide);
|
||||
}
|
||||
|
||||
void MainWindow::onSetStatusText(const QString &text) {
|
||||
this->setStatusText(text);
|
||||
}
|
||||
|
||||
void MainWindow::setStatusText(const QString &text, bool override, int timeout) {
|
||||
if (override) {
|
||||
m_statusOverrideActive = true;
|
||||
|
|
|
@ -175,6 +175,7 @@ private slots:
|
|||
void menuHwDeviceClicked();
|
||||
void onUpdatesAvailable(const QJsonObject &updates);
|
||||
void toggleSearchbar(bool enabled);
|
||||
void onSetStatusText(const QString &text);
|
||||
|
||||
private:
|
||||
void initStatusBar();
|
||||
|
|
Loading…
Reference in a new issue