TcpClient::~TcpClient() { qDebug() << Q_FUNC_INFO; _socket->disconnectFromHost(); while(!_subscribedRefs.isEmpty()) { DataRef *ref = _subscribedRefs.values().first(); _subscribedRefs.remove(ref); ref->disconnect(this); _refProvider->unsubscribeRef(ref); } emit discoed(this); }
TcpClient::~TcpClient() { DEBUG; _socket->disconnectFromHost(); while(!_subscribedRefs.isEmpty()) { DataRef *ref = _subscribedRefs.values().first(); _subscribedRefs.remove(ref); ref->disconnect(this); _refProvider->unsubscribeRef(ref); } foreach(int but, _heldButtons) _refProvider->buttonRelease(but); emit discoed(this); }