forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user