UIFrameBuffer::~UIFrameBuffer() { /* Deinitialize critical-section: */ RTCritSectDelete(&m_critSect); /* Disconnect handlers: */ if (m_pMachineView) cleanupConnections(); }
void prepareSessionToken(EnginioClientPrivate *enginio) { cleanupConnections(); QJsonObject data; data[EnginioString::username] = _user; data[EnginioString::password] = _pass; _reply = enginio->identify(data); _replyFinished = QObject::connect(_reply.data(), &QNetworkReply::finished, SessionSetterFunctor(enginio, _reply.data())); _enginioDestroyed = QObject::connect(enginio->q_ptr, &EnginioClient::destroyed, DisconnectConnection(_replyFinished)); }
void UIFrameBuffer::setView(UIMachineView * pView) { /* We are not supposed to use locking for things which are done * on the GUI thread. Unfortunately I am not clever enough to * understand the original author's wise synchronisation logic * so I will do it anyway. */ lock(); /* Disconnect handlers: */ if (m_pMachineView) cleanupConnections(); /* Reassign machine-view: */ m_pMachineView = pView; m_WinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0; /* Connect handlers: */ if (m_pMachineView) prepareConnections(); /* Unlock thread finally: */ unlock(); }
~EnginioBasicAuthenticationPrivate() { cleanupConnections(); }