QmlProfiler: Refactor complete() methods

The complete() methods do something more specific. We should call them
by what they do. Also, we don't need to signal the finishing of data
acquisition via a signal and most of the postprocessing can happen in
the worker thread.

Change-Id: Iae986aefb8e7e7d4327c481d7a85325bbff7fa48
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-09-10 17:11:21 +02:00
parent 44750d047e
commit fdbed834fa
6 changed files with 31 additions and 44 deletions

View File

@@ -96,11 +96,7 @@ QmlProfilerClientManager::~QmlProfilerClientManager()
void QmlProfilerClientManager::setModelManager(QmlProfilerModelManager *m)
{
if (d->modelManager)
disconnect(this,SIGNAL(dataReadyForProcessing()), d->modelManager, SLOT(complete()));
d->modelManager = m;
if (d->modelManager)
connect(this,SIGNAL(dataReadyForProcessing()), d->modelManager, SLOT(complete()));
}
void QmlProfilerClientManager::setFlushInterval(quint32 flushInterval)
@@ -315,7 +311,8 @@ void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
{
d->modelManager->traceTime()->increaseEndTime(maximumTime);
d->qmlDataReady = true;
emit dataReadyForProcessing();
if (d->modelManager)
d->modelManager->acquiringDone();
// once complete is sent, reset the flags
d->qmlDataReady = false;
}