forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user