Commit e3c16259 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: When showing connection error, cancel any connects

The device can exist without being open, which makes the disconnect()
when the message box finishes ineffective. Also, disconnect() merely
trashes the signals and slots, but doesn't remove the device.

Task-number: QTCREATORBUG-15383
Change-Id: I8eb8ca3db496c9841156c0949c3e3bfd92329056
Reviewed-by: default avatarChristian Stenger <>
parent f710ec8c
......@@ -245,6 +245,8 @@ void QmlProfilerClientManager::tryToConnect()
} else if (d->connectionAttempts == 50) {
d->connectionAttempts = 0;
delete d->connection; // delete directly.
d->connection = 0;
QMessageBox *infoBox = QmlProfilerTool::requestMessageBox();
......@@ -300,14 +302,11 @@ void QmlProfilerClientManager::logState(const QString &msg)
void QmlProfilerClientManager::retryMessageBoxFinished(int result)
if (d->connection) {
QTC_ASSERT(!d->connection->isOpen(), return);
if (d->connection->isConnecting())
QTC_ASSERT(!d->connection, disconnectClient());
switch (result) {
case QMessageBox::Retry: {
d->connectionAttempts = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment