Beautifier: Use Utils::runAsync

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

Change-Id: If7ca1f479bb837e61fa7f57535b7b099f09800f2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2016-02-11 15:53:17 +01:00
parent ecdc2013cd
commit 5c0b2d1b14
2 changed files with 4 additions and 4 deletions

View File

@@ -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));
}
}
}