Update re-connect interval displayed as part of the status

The re-connect interval is displayed as part of the status by `StatusInfo`
and the connection options page when the status is disconnected. This
change simply emits the `statusChanged()` signal to ensure the displayed
re-connect interval is updated when it changes.
This commit is contained in:
Martchus 2024-06-21 22:59:32 +02:00
parent 65642bfef0
commit 80e64c16e6
2 changed files with 4 additions and 1 deletions

View File

@ -826,6 +826,9 @@ inline void SyncthingConnection::setAutoReconnectInterval(int interval)
m_autoReconnectTimer.stop();
}
m_autoReconnectTimer.setInterval(interval);
if (m_status == SyncthingStatus::Disconnected) {
emit statusChanged(m_status);
}
}
/*!

View File

@ -131,7 +131,7 @@ QWidget *ConnectionOptionPage::setupWidget()
ui()->pollErrorsLabel->setToolTip(ui()->pollErrorsSpinBox->toolTip());
ui()->reconnectLabel->setToolTip(ui()->reconnectSpinBox->toolTip());
if (m_connection) {
QObject::connect(m_connection, &SyncthingConnection::statusChanged, bind(&ConnectionOptionPage::updateConnectionStatus, this));
QObject::connect(m_connection, &SyncthingConnection::statusChanged, widget, bind(&ConnectionOptionPage::updateConnectionStatus, this));
} else {
hideConnectionStatus();
}