From c90cca7904bb55311b13d0c39b58319a106b13d6 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Feb 2012 16:19:05 +0100 Subject: [PATCH] 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 --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 31519b6edde..7d11326cb68 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -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)),