aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmldebug
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-31 12:52:24 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-06-06 12:44:47 +0000
commit27907bc417a093a63413602316ab10dde7e20180 (patch)
treebadfef1bac3f5b890b233c95fc05dd4bbdf740a9 /src/libs/qmldebug
parentd3204ed5d49f4d6ee897c4e831c0284501b12953 (diff)
QmlProfiler: When retrying to connect, double the timeout
If you are retrying, then probably you want it to be more patient this time. Also, tell the user how long we have waited and how long we are going to wait when retrying. In turn, reduce the number of "internal" retries. Retrying 10 times should be enough to determine if the given timeout is too short. This will give us an initial waiting time of 2s, and make the second try 4s. Change-Id: Ibdfe02d041550eb16cadc59cec1b78ce97289b30 Task-number: QTCREATORBUG-20529 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/qmldebug')
-rw-r--r--src/libs/qmldebug/qmldebugconnectionmanager.cpp6
-rw-r--r--src/libs/qmldebug/qmldebugconnectionmanager.h9
2 files changed, 7 insertions, 8 deletions
diff --git a/src/libs/qmldebug/qmldebugconnectionmanager.cpp b/src/libs/qmldebug/qmldebugconnectionmanager.cpp
index 2901e21d9d..02d9297cac 100644
--- a/src/libs/qmldebug/qmldebugconnectionmanager.cpp
+++ b/src/libs/qmldebug/qmldebugconnectionmanager.cpp
@@ -43,12 +43,6 @@ QmlDebugConnectionManager::~QmlDebugConnectionManager()
disconnectConnectionSignals();
}
-void QmlDebugConnectionManager::setRetryParams(int interval, int maxAttempts)
-{
- m_retryInterval = interval;
- m_maximumRetries = maxAttempts;
-}
-
void QmlDebugConnectionManager::connectToServer(const QUrl &server)
{
if (m_server != server) {
diff --git a/src/libs/qmldebug/qmldebugconnectionmanager.h b/src/libs/qmldebug/qmldebugconnectionmanager.h
index 2bab6b082c..ccda63f38f 100644
--- a/src/libs/qmldebug/qmldebugconnectionmanager.h
+++ b/src/libs/qmldebug/qmldebugconnectionmanager.h
@@ -47,7 +47,12 @@ public:
bool isConnecting() const;
bool isConnected() const;
- void setRetryParams(int interval, int maxAttempts);
+ int retryInterval() const { return m_retryInterval; }
+ void setRetryInterval(int retryInterval) { m_retryInterval = retryInterval; }
+
+ int maximumRetries() const { return m_maximumRetries; }
+ void setMaximumRetries(int maximumRetries) { m_maximumRetries = maximumRetries; }
+
void retryConnect();
signals:
@@ -71,7 +76,7 @@ private:
QUrl m_server;
int m_retryInterval = 200;
- int m_maximumRetries = 50;
+ int m_maximumRetries = 10;
int m_numRetries = 0;
void createConnection();