From 4214bb1a9b83c6795a705b1c0e1a5ef7e4ad94b0 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Fri, 8 Apr 2011 14:39:55 +0200 Subject: [PATCH] QmlProfiler: cleaning output when starting new trace Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index bd148c8551b..60f53c31caa 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -298,6 +298,9 @@ void QmlProfilerTool::connectClient() if (QmlProfilerPlugin::debugOutput) qWarning("QmlProfiler: Failed to connect: %s", qPrintable(d->m_client->errorString())); } + + if (d->m_traceWindow->isRecording()) + clearDisplay(); } void QmlProfilerTool::disconnectClient() @@ -308,9 +311,11 @@ void QmlProfilerTool::disconnectClient() void QmlProfilerTool::startRecording() { - d->m_traceWindow->setRecordAtStart(true); - if (d->m_client->isConnected()) + d->m_traceWindow->setRecordAtStart(true); + if (d->m_client->isConnected()) { + clearDisplay(); d->m_traceWindow->setRecording(true); + } emit fetchingData(true); }