mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add client UI setting for idleclientdisconnect (#2244)
* Add client UI setting for idleclientdisconnect Added disabled option in client UI for client disconnect. * Updated settings text Updated settings text for clarity. * Updated descripton text (again) Per request for clarity
This commit is contained in:
parent
dfc4d9937b
commit
63a4f147f4
5 changed files with 22 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ RemoteClient::RemoteClient(QObject *parent)
|
|||
idleTimer->setInterval(idlekeepalive * 1000);
|
||||
connect(idleTimer, SIGNAL(timeout()), this, SLOT(doIdleTimeOut()));
|
||||
connect(this, SIGNAL(resetIdleTimerClock()), idleTimer, SLOT(start()));
|
||||
|
||||
|
||||
socket = new QTcpSocket(this);
|
||||
socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
|
||||
connect(socket, SIGNAL(connected()), this, SLOT(slotConnected()));
|
||||
|
|
@ -390,8 +390,11 @@ QString RemoteClient::getSrvClientID(const QString _hostname)
|
|||
|
||||
void RemoteClient::doIdleTimeOut()
|
||||
{
|
||||
doDisconnectFromServer();
|
||||
emit idleTimeout();
|
||||
if (settingsCache->getIdleClientTimeOutEnabled()) {
|
||||
doDisconnectFromServer();
|
||||
emit idleTimeout();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RemoteClient::resetIdleTimer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue