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

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: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent ec4523f3
...@@ -114,9 +114,10 @@ QmlProfilerProcessedModel::~QmlProfilerProcessedModel() ...@@ -114,9 +114,10 @@ QmlProfilerProcessedModel::~QmlProfilerProcessedModel()
void QmlProfilerProcessedModel::clear() void QmlProfilerProcessedModel::clear()
{ {
m_detailsRewriter->clearRequests(); m_detailsRewriter->clearRequests();
// This call emits changed(). Don't emit it again here.
QmlProfilerSimpleModel::clear(); QmlProfilerSimpleModel::clear();
emit changed();
m_emitChanged = false; m_emitChanged = false;
} }
...@@ -155,8 +156,9 @@ void QmlProfilerProcessedModel::complete() ...@@ -155,8 +156,9 @@ void QmlProfilerProcessedModel::complete()
m_detailsRewriter->reloadDocuments(); m_detailsRewriter->reloadDocuments();
// This call emits changed(). Don't emit it again here.
QmlProfilerSimpleModel::complete(); QmlProfilerSimpleModel::complete();
emit changed();
m_emitChanged = false; m_emitChanged = false;
} }
......
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