Tasking::Async: Rename Async into AsyncTask

Rename Utils::AsyncTask into Utils::Async.
Rename AsyncTaskBase into AsyncTask.

Task-number: QTCREATORBUG-29102
Change-Id: I3aa24d84138c19922d4f61b1c9cf15bc8989f60e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-05-03 14:33:12 +02:00
parent 1d69f943aa
commit 187a7640de
26 changed files with 123 additions and 124 deletions

View File

@@ -114,12 +114,12 @@ DiffFilesController::DiffFilesController(IDocument *document)
const auto setupTree = [this, storage](TaskTree &taskTree) {
QList<std::optional<FileData>> *outputList = storage.activeStorage();
const auto setupDiff = [this](AsyncTask<FileData> &async, const ReloadInput &reloadInput) {
const auto setupDiff = [this](Async<FileData> &async, const ReloadInput &reloadInput) {
async.setConcurrentCallData(
DiffFile(ignoreWhitespace(), contextLineCount()), reloadInput);
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
};
const auto onDiffDone = [outputList](const AsyncTask<FileData> &async, int i) {
const auto onDiffDone = [outputList](const Async<FileData> &async, int i) {
if (async.isResultAvailable())
(*outputList)[i] = async.result();
};
@@ -130,7 +130,7 @@ DiffFilesController::DiffFilesController(IDocument *document)
using namespace std::placeholders;
QList<TaskItem> tasks {parallel, optional};
for (int i = 0; i < inputList.size(); ++i) {
tasks.append(Async<FileData>(std::bind(setupDiff, _1, inputList.at(i)),
tasks.append(AsyncTask<FileData>(std::bind(setupDiff, _1, inputList.at(i)),
std::bind(onDiffDone, _1, i)));
}
taskTree.setupRoot(tasks);