forked from qt-creator/qt-creator
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:
@@ -533,7 +533,8 @@ QWidget *QmlProfilerTool::createWidgets()
|
|||||||
|
|
||||||
void QmlProfilerTool::connectClient(int port)
|
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_client = new QDeclarativeDebugConnection;
|
||||||
d->m_traceWindow->reset(d->m_client);
|
d->m_traceWindow->reset(d->m_client);
|
||||||
connect(d->m_client, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
|
connect(d->m_client, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
|
||||||
|
Reference in New Issue
Block a user