示例#1
0
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);
}
示例#2
0
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);
}