Commit fb5237a9 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Only load data into child models when it's ready

Loading data on ProcessingData would lead to incomplete information
about source code locations. Rebuilding the whole model on any kind
of changed() signal is wasteful.

Task-number: QTCREATORBUG-11100
Change-Id: I9f8d718bff6149ca2dc2d0482c11d66d940af15d
Reviewed-by: default avatarKai Koehne <>
parent 6dce72ff
...@@ -81,7 +81,7 @@ int AbstractTimelineModel::getBindingLoopDest(int index) const ...@@ -81,7 +81,7 @@ int AbstractTimelineModel::getBindingLoopDest(int index) const
void AbstractTimelineModel::dataChanged() void AbstractTimelineModel::dataChanged()
{ {
switch (m_modelManager->state()) { switch (m_modelManager->state()) {
case QmlProfilerDataState::ProcessingData: case QmlProfilerDataState::Done:
loadData(); loadData();
break; break;
case QmlProfilerDataState::ClearingData: case QmlProfilerDataState::ClearingData:
...@@ -96,10 +96,10 @@ void QmlProfilerEventsModelProxy::limitToRange(qint64 rangeStart, qint64 rangeEn ...@@ -96,10 +96,10 @@ void QmlProfilerEventsModelProxy::limitToRange(qint64 rangeStart, qint64 rangeEn
void QmlProfilerEventsModelProxy::dataChanged() void QmlProfilerEventsModelProxy::dataChanged()
{ {
if (d->modelManager->state() == QmlProfilerDataState::ClearingData) if (d->modelManager->state() == QmlProfilerDataState::Done)
loadData(); loadData();
else if (d->modelManager->state() == QmlProfilerDataState::ClearingData)
} }
QSet<QString> QmlProfilerEventsModelProxy::eventsInBindingLoop() const QSet<QString> QmlProfilerEventsModelProxy::eventsInBindingLoop() const
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment