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: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2013-12-16 10:46:43 +01:00
parent 6dce72ff6a
commit fb5237a9c8
2 changed files with 4 additions and 4 deletions

View File

@@ -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:

View File

@@ -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