Commit e307b7ee authored by Eike Ziller's avatar Eike Ziller

QmlProfiler: Avoid QtConcurrent

QtConcurrent runs everything on a global thread pool, which means that
calls of QtConcurrent::run/map/etc can block each other.

Change-Id: Ia7a61b5ae1e0919113205a83a43caa1f27015732
Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
parent d4816850
......@@ -338,7 +338,7 @@ void QmlProfilerModelManager::save(const QString &filename)
d->notesModel->saveData();
QFuture<void> result = QtConcurrent::run<void>([this, file] (QFutureInterface<void> &future) {
QFuture<void> result = Utils::runAsync<void>([this, file] (QFutureInterface<void> &future) {
QmlProfilerFileWriter writer;
writer.setTraceTime(traceTime()->startTime(), traceTime()->endTime(),
traceTime()->duration());
......@@ -367,7 +367,7 @@ void QmlProfilerModelManager::load(const QString &filename)
clear();
setState(AcquiringData);
QFuture<void> result = QtConcurrent::run<void>([this, file] (QFutureInterface<void> &future) {
QFuture<void> result = Utils::runAsync<void>([this, file] (QFutureInterface<void> &future) {
QmlProfilerFileReader reader;
reader.setFuture(&future);
connect(&reader, &QmlProfilerFileReader::error, this, &QmlProfilerModelManager::error);
......
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