QmlProfiler: Don't print assert when trying to connect a second time

This can happen when e.g. the first attempt failed because of an
unavailable port.

Change-Id: I7e61c6f6d0a65c48c1b7031be95bdabd965fe5ab
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2012-02-21 16:19:05 +01:00
parent fcaf3d4f4c
commit c90cca7904

View File

@@ -533,7 +533,8 @@ QWidget *QmlProfilerTool::createWidgets()
void QmlProfilerTool::connectClient(int port)
{
QTC_ASSERT(!d->m_client, return;)
if (d->m_client)
delete d->m_client;
d->m_client = new QDeclarativeDebugConnection;
d->m_traceWindow->reset(d->m_client);
connect(d->m_client, SIGNAL(stateChanged(QAbstractSocket::SocketState)),