From 0e0535284379e6b740d439fa3dba2e2b5f695756 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 24 May 2016 16:22:33 +0200 Subject: QmlProfiler: When flushing data, send it in the right order Some of the adapters immediately return dataReady() when reportData() is invoked. This means that there is only one adapter in the start times list then, which in turn causes all the data from that adapter to be sent at once, without caring for the other adapters' timestamps. Change-Id: Ic1e12fdcefb0a691067518fba100368f13c927f7 Task-number: QTBUG-53590 Reviewed-by: Simon Hausmann --- src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp index 2654cf662b..a5ee494ced 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp @@ -407,20 +407,24 @@ void QQmlProfilerServiceImpl::messageReceived(const QByteArray &message) void QQmlProfilerServiceImpl::flush() { QMutexLocker lock(&m_configMutex); + QList reporting; foreach (QQmlAbstractProfilerAdapter *profiler, m_engineProfilers) { if (profiler->isRunning()) { m_startTimes.insert(-1, profiler); - profiler->reportData(); + reporting.append(profiler); } } foreach (QQmlAbstractProfilerAdapter *profiler, m_globalProfilers) { if (profiler->isRunning()) { m_startTimes.insert(-1, profiler); - profiler->reportData(); + reporting.append(profiler); } } + + foreach (QQmlAbstractProfilerAdapter *profiler, reporting) + profiler->reportData(); } QT_END_NAMESPACE -- cgit v1.2.3