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:
parent
65642bfef0
commit
80e64c16e6
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue