QmlProfiler: manage premature disconnection when app killed

The profiler tool was assuming that the socket would get
disconnected after the application was stopped by the user.
Sometimes it is not the case.  This patch manages the
oposite situation gracefully.

Change-Id: I4ae439bf2ce6caece37e97f735e980d18c446df0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-05-11 17:19:15 +02:00
parent bbbc08a6ea
commit 84b4b52aed
3 changed files with 12 additions and 0 deletions

View File

@@ -236,6 +236,11 @@ void QmlProfilerClientManager::connectToClient()
}
}
bool QmlProfilerClientManager::isConnected() const
{
return d->connection && d->connection->isConnected();
}
void QmlProfilerClientManager::disconnectClient()
{
// this might be actually be called indirectly by QDDConnectionPrivate::readyRead(), therefore allow