mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
don't disable autoconnect on disconnect (#5372)
* don't disable autoconnect on disconnect * update autoConnect on clicking the checkbox
This commit is contained in:
parent
24a0dac420
commit
f32890916d
2 changed files with 1 additions and 2 deletions
|
|
@ -85,6 +85,7 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(savePasswordCheckBox, &QCheckBox::QT_STATE_CHANGED, this, &DlgConnect::passwordSaved);
|
connect(savePasswordCheckBox, &QCheckBox::QT_STATE_CHANGED, this, &DlgConnect::passwordSaved);
|
||||||
|
connect(autoConnectCheckBox, &QCheckBox::QT_STATE_CHANGED, &servers, &ServersSettings::setAutoConnect);
|
||||||
|
|
||||||
serverIssuesLabel =
|
serverIssuesLabel =
|
||||||
new QLabel(tr("If you have any trouble connecting or registering then contact the server staff for help!"));
|
new QLabel(tr("If you have any trouble connecting or registering then contact the server staff for help!"));
|
||||||
|
|
@ -345,7 +346,6 @@ void DlgConnect::actOk()
|
||||||
}
|
}
|
||||||
|
|
||||||
servers.setPrevioushostName(saveEdit->text());
|
servers.setPrevioushostName(saveEdit->text());
|
||||||
servers.setAutoConnect(autoConnectCheckBox->isChecked());
|
|
||||||
|
|
||||||
if (playernameEdit->text().isEmpty()) {
|
if (playernameEdit->text().isEmpty()) {
|
||||||
QMessageBox::critical(this, tr("Connect Warning"), tr("The player name can't be empty."));
|
QMessageBox::critical(this, tr("Connect Warning"), tr("The player name can't be empty."));
|
||||||
|
|
|
||||||
|
|
@ -579,7 +579,6 @@ void RemoteClient::activateToServer(const QString &_token)
|
||||||
|
|
||||||
void RemoteClient::disconnectFromServer()
|
void RemoteClient::disconnectFromServer()
|
||||||
{
|
{
|
||||||
SettingsCache::instance().servers().setAutoConnect(false);
|
|
||||||
emit sigDisconnectFromServer();
|
emit sigDisconnectFromServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue