QmlProfiler: Consistently clear when clear button pressed

Several QML properties need extra treatment to avoid stale data
after clearing. Toggling the visibility of the timeline renderer
doesn't really help there.

Task-number: QTCREATORBUG-11833

Change-Id: I1903d7bd69d6fe31ecc4cadca8e30fa2104fa09a
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-03-25 17:10:25 +01:00
parent 85b7d34ea8
commit 0c9a9348f9
6 changed files with 24 additions and 26 deletions

View File

@@ -292,13 +292,11 @@ qint64 QmlProfilerTraceView::selectionEnd() const
return 0;
}
void QmlProfilerTraceView::clearDisplay()
void QmlProfilerTraceView::clear()
{
d->m_zoomControl->setRange(0,0);
d->m_mainView->rootObject()->setProperty("scrollY", QVariant(0));
QMetaObject::invokeMethod(d->m_mainView->rootObject(), "clearAll");
QMetaObject::invokeMethod(d->m_overview->rootObject(), "clearDisplay");
QMetaObject::invokeMethod(d->m_mainView->rootObject(), "clear");
QMetaObject::invokeMethod(d->m_overview->rootObject(), "clear");
QMetaObject::invokeMethod(d->m_timebar->rootObject(), "clear");
}
void QmlProfilerTraceView::selectNextEventByHash(const QString &hash)