Use current config in applyAndReconnect()
This commit is contained in:
parent
ef5fd1cb9c
commit
9a1157fd6b
|
@ -51,7 +51,6 @@ ConnectionOptionPage::~ConnectionOptionPage()
|
||||||
QWidget *ConnectionOptionPage::setupWidget()
|
QWidget *ConnectionOptionPage::setupWidget()
|
||||||
{
|
{
|
||||||
auto *w = ConnectionOptionPageBase::setupWidget();
|
auto *w = ConnectionOptionPageBase::setupWidget();
|
||||||
updateConnectionStatus();
|
|
||||||
ui()->certPathSelection->provideCustomFileMode(QFileDialog::ExistingFile);
|
ui()->certPathSelection->provideCustomFileMode(QFileDialog::ExistingFile);
|
||||||
ui()->certPathSelection->lineEdit()->setPlaceholderText(QCoreApplication::translate("QtGui::ConnectionOptionPage", "Auto-detected for local instance"));
|
ui()->certPathSelection->lineEdit()->setPlaceholderText(QCoreApplication::translate("QtGui::ConnectionOptionPage", "Auto-detected for local instance"));
|
||||||
QObject::connect(m_connection, &SyncthingConnection::statusChanged, bind(&ConnectionOptionPage::updateConnectionStatus, this));
|
QObject::connect(m_connection, &SyncthingConnection::statusChanged, bind(&ConnectionOptionPage::updateConnectionStatus, this));
|
||||||
|
@ -210,13 +209,15 @@ void ConnectionOptionPage::reset()
|
||||||
ui()->selectionComboBox->clear();
|
ui()->selectionComboBox->clear();
|
||||||
ui()->selectionComboBox->addItems(itemTexts);
|
ui()->selectionComboBox->addItems(itemTexts);
|
||||||
ui()->selectionComboBox->setCurrentIndex(0);
|
ui()->selectionComboBox->setCurrentIndex(0);
|
||||||
|
|
||||||
|
updateConnectionStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionOptionPage::applyAndReconnect()
|
void ConnectionOptionPage::applyAndReconnect()
|
||||||
{
|
{
|
||||||
apply();
|
apply();
|
||||||
m_connection->reconnect(primaryConnectionSettings());
|
m_connection->reconnect((m_currentIndex == 0 ? m_primarySettings : m_secondarySettings[static_cast<size_t>(m_currentIndex - 1)]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotificationsOptionPage
|
// NotificationsOptionPage
|
||||||
|
|
Loading…
Reference in New Issue