aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-06-28 16:22:44 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-07-08 11:39:48 +0000
commit918710737d7b531983c4e33753905de486dd42b7 (patch)
treeed0d145ded643bd7956d61ce6cc1593a172921b4 /src/libs
parent89fb3d25a05a2d4bd739079cb98525b68f133648 (diff)
QmlDebug: Destroy connection before signaling failure or retrying
Having the old local server still open can lead to some client connecting after we have already signaled a failure, thus "undoing" the failure. This leads to some interesting UI glitches. Fixes: QTCREATORBUG-22641 Change-Id: I135ad59fce5c9eb696221a212f54460126e4830f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/qmldebug/qmldebugconnectionmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/qmldebug/qmldebugconnectionmanager.cpp b/src/libs/qmldebug/qmldebugconnectionmanager.cpp
index 02d9297cac..217260d8d2 100644
--- a/src/libs/qmldebug/qmldebugconnectionmanager.cpp
+++ b/src/libs/qmldebug/qmldebugconnectionmanager.cpp
@@ -130,6 +130,7 @@ void QmlDebugConnectionManager::startLocalServer()
if (!m_connection || ++(m_numRetries) >= m_maximumRetries) {
stopConnectionTimer();
+ destroyConnection();
emit connectionFailed();
}
});
@@ -145,10 +146,10 @@ void QmlDebugConnectionManager::startLocalServer()
void QmlDebugConnectionManager::retryConnect()
{
+ destroyConnection();
if (m_server.scheme() == Utils::urlSocketScheme()) {
startLocalServer();
} else if (m_server.scheme() == Utils::urlTcpScheme()) {
- destroyConnection();
connectToTcpServer();
} else {
emit connectionFailed();