Fix multiple remoe connected changed signals even if not changed
This commit is contained in:
parent
32c33ec23f
commit
97514a9504
@ -270,10 +270,16 @@ void TunnelProxyRemoteConnection::setState(State state)
|
|||||||
if (m_state == state)
|
if (m_state == state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bool remoteConnected = m_state == StateRemoteConnected;
|
||||||
|
|
||||||
m_state = state;
|
m_state = state;
|
||||||
qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state;
|
qCDebug(dcTunnelProxyRemoteConnection()) << "State changed" << m_state;
|
||||||
emit stateChanged(m_state);
|
emit stateChanged(m_state);
|
||||||
emit remoteConnectedChanged(m_state == StateRemoteConnected);
|
|
||||||
|
bool stillRemoteConnected = m_state == StateRemoteConnected;
|
||||||
|
if (remoteConnected != stillRemoteConnected) {
|
||||||
|
emit remoteConnectedChanged(m_state == StateRemoteConnected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user