diff options
author | Eike Ziller <[email protected]> | 2015-11-03 13:06:35 +0100 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2015-11-03 13:06:35 +0100 |
commit | 81e9b96148a1774f96974b3f383c7d18697023c2 (patch) | |
tree | 14be18522d5cab6385e9e4bd92b410d5b95e98c2 /src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp | |
parent | 406d231f1ba31aba5ff028f052345e60877b2394 (diff) | |
parent | 62393af0ab909fee19356e91672f7ce69f86e221 (diff) |
Merge remote-tracking branch 'origin/3.6'
Change-Id: Ic7cba72e7bec10e4fc0099b97e3317e391a6aa5d
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index 2b09d4e289c..71d1d2f0175 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -105,6 +105,7 @@ void QmlProfilerClientManager::setTcpConnection(QString host, quint64 port) { d->tcpHost = host; d->tcpPort = port; + disconnectClient(); } void QmlProfilerClientManager::clearBufferedData() @@ -139,6 +140,8 @@ void QmlProfilerClientManager::connectClient(quint16 port) this, &QmlProfilerClientManager::qmlDebugConnectionOpened); connect(d->connection, &QmlDebugConnection::closed, this, &QmlProfilerClientManager::qmlDebugConnectionClosed); + connect(d->connection, &QmlDebugConnection::error, + this, &QmlProfilerClientManager::qmlDebugConnectionError); d->connectionTimer.start(); d->tcpPort = port; } @@ -270,6 +273,17 @@ void QmlProfilerClientManager::qmlDebugConnectionClosed() emit connectionClosed(); } +void QmlProfilerClientManager::qmlDebugConnectionError(QDebugSupport::Error error) +{ + logState(tr("Debug connection error %1").arg(error)); + if (d->connection->isOpen()) { + disconnectClient(); + emit connectionClosed(); + } else { + disconnectClient(); + } +} + void QmlProfilerClientManager::logState(const QString &msg) { QString state = QLatin1String("QML Profiler: ") + msg; |