QmlProfiler: Don't emit two changed() signals in a row

Without this all the data is processed another time in all timeline
models when the second signal is emitted. This is quite wasteful.

Task-number: QTCREATORBUG-10950
Change-Id: Iac1315689e0900abb48efc1cf6390ec559a1897c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Ulf Hermann
2013-12-09 12:52:51 +01:00
parent ec4523f358
commit cf142973e0

View File

@@ -114,9 +114,10 @@ QmlProfilerProcessedModel::~QmlProfilerProcessedModel()
void QmlProfilerProcessedModel::clear()
{
m_detailsRewriter->clearRequests();
// This call emits changed(). Don't emit it again here.
QmlProfilerSimpleModel::clear();
emit changed();
m_emitChanged = false;
}
@@ -155,8 +156,9 @@ void QmlProfilerProcessedModel::complete()
m_detailsRewriter->reloadDocuments();
// This call emits changed(). Don't emit it again here.
QmlProfilerSimpleModel::complete();
emit changed();
m_emitChanged = false;
}