Merge remote-tracking branch 'origin/3.6' into 4.0

Conflicts:
	src/plugins/projectexplorer/applicationlauncher.cpp
	src/plugins/projectexplorer/applicationlauncher.h
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
	src/plugins/qmlprofiler/qmlprofilertool.cpp
	src/plugins/qtsupport/uicodemodelsupport.cpp
	src/plugins/qtsupport/uicodemodelsupport.h

Change-Id: I6f6ae77422d99f4f422b108ade6b64273df9dd57
This commit is contained in:
Eike Ziller
2016-03-03 16:10:04 +01:00
10 changed files with 63 additions and 48 deletions

View File

@@ -259,14 +259,18 @@ void QmlProfilerClientManager::tryToConnect()
d->connectionTimer.stop();
d->connectionAttempts = 0;
} else if (d->connection && d->connection->socketState() != QAbstractSocket::ConnectedState) {
// Replace the connection after trying for some time. On some operating systems (OSX) the
// very first connection to a TCP server takes a very long time to get established.
if (d->connectionAttempts < 3) {
// Replace the connection after trying for some time. On some operating systems (OSX) the
// very first connection to a TCP server takes a very long time to get established.
// delete directly here, so that any pending events aren't delivered. We don't want the
// connection first to be established and then torn down again.
delete d->connection;
d->connection = 0;
connectTcpClient(d->tcpPort);
// delete directly here, so that any pending events aren't delivered. We don't want the
// connection first to be established and then torn down again.
delete d->connection;
d->connection = 0;
connectTcpClient(d->tcpPort);
} else if (!d->connection->isConnecting()) {
d->connection->connectToHost(d->tcpHost, d->tcpPort);
}
} else if (d->connectionAttempts == 50) {
d->connectionTimer.stop();
d->connectionAttempts = 0;