Commit fb5237a9 authored by Ulf Hermann's avatar Ulf Hermann

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 <kai.koehne@digia.com>
parent 6dce72ff
......@@ -81,7 +81,7 @@ int AbstractTimelineModel::getBindingLoopDest(int index) const
void AbstractTimelineModel::dataChanged()
{
switch (m_modelManager->state()) {
case QmlProfilerDataState::ProcessingData:
case QmlProfilerDataState::Done:
loadData();
break;
case QmlProfilerDataState::ClearingData:
......
......@@ -96,10 +96,10 @@ void QmlProfilerEventsModelProxy::limitToRange(qint64 rangeStart, qint64 rangeEn
void QmlProfilerEventsModelProxy::dataChanged()
{
if (d->modelManager->state() == QmlProfilerDataState::ClearingData)
clear();
else
if (d->modelManager->state() == QmlProfilerDataState::Done)
loadData();
else if (d->modelManager->state() == QmlProfilerDataState::ClearingData)
clear();
}
QSet<QString> QmlProfilerEventsModelProxy::eventsInBindingLoop() const
......
Markdown is supported
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