QmlProfiler: Don't try to reconnect while already connecting

Hanging connection attempts will be aborted in response to the
"retry" message box now.

Change-Id: I63775eed9d7677a62293ba5c96a43e839ba285b4
Task-number: QTCREATORBUG-14685
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-07-06 14:33:49 +02:00
parent 6c9c0efc09
commit 2ee019b46f
3 changed files with 11 additions and 1 deletions

View File

@@ -215,7 +215,7 @@ void QmlProfilerClientManager::disconnectClientSignals()
void QmlProfilerClientManager::connectToClient()
{
if (!d->connection || d->connection->isOpen())
if (!d->connection || d->connection->isOpen() || d->connection->isConnecting())
return;
d->connection->connectToHost(d->tcpHost, d->tcpPort);
@@ -290,6 +290,10 @@ void QmlProfilerClientManager::logState(const QString &msg)
void QmlProfilerClientManager::retryMessageBoxFinished(int result)
{
QTC_ASSERT(!d->connection->isOpen(), return);
if (d->connection->isConnecting())
d->connection->disconnect();
switch (result) {
case QMessageBox::Retry: {
d->connectionAttempts = 0;