Commit 5c0b2d1b authored by Eike Ziller's avatar Eike Ziller

Beautifier: Use Utils::runAsync

Gets rid of usage of global thread pool and ugly implementation.

Change-Id: If7ca1f479bb837e61fa7f57535b7b099f09800f2
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent ecdc2013
......@@ -31,7 +31,7 @@
#include <coreplugin/icore.h>
#include <utils/QtConcurrentTools>
#include <utils/runextensions.h>
#include <QDateTime>
#include <QFile>
......@@ -70,7 +70,7 @@ void ArtisticStyleSettings::updateVersion()
if (m_versionFuture.isRunning())
m_versionFuture.cancel();
m_versionFuture = QtConcurrent::run(&ArtisticStyleSettings::helperUpdateVersion, this);
m_versionFuture = Utils::runAsync(&ArtisticStyleSettings::helperUpdateVersion, this);
m_versionWatcher.setFuture(m_versionFuture);
}
......
......@@ -48,7 +48,7 @@
#include <texteditor/texteditorconstants.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/QtConcurrentTools>
#include <utils/runextensions.h>
#include <QAction>
#include <QDir>
......@@ -236,7 +236,7 @@ void BeautifierPlugin::formatCurrentFile(const Command &command, int startPos, i
connect(watcher, &QFutureWatcherBase::finished, m_asyncFormatMapper,
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
m_asyncFormatMapper->setMapping(watcher, watcher);
watcher->setFuture(QtConcurrent::run(&BeautifierPlugin::formatAsync, this, task));
watcher->setFuture(Utils::runAsync(&BeautifierPlugin::formatAsync, this, task));
}
}
}
......
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