From a3ffa3d6659e00e0762017cf64911db0183a250c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 4 Aug 2019 03:27:53 +0200 Subject: NOISSUE asynchronous, parallel mod folder listing and mod resolving --- api/logic/minecraft/mod/ModFolderLoadTask.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 api/logic/minecraft/mod/ModFolderLoadTask.cpp (limited to 'api/logic/minecraft/mod/ModFolderLoadTask.cpp') diff --git a/api/logic/minecraft/mod/ModFolderLoadTask.cpp b/api/logic/minecraft/mod/ModFolderLoadTask.cpp new file mode 100644 index 00000000..88349877 --- /dev/null +++ b/api/logic/minecraft/mod/ModFolderLoadTask.cpp @@ -0,0 +1,18 @@ +#include "ModFolderLoadTask.h" +#include + +ModFolderLoadTask::ModFolderLoadTask(QDir dir) : + m_dir(dir), m_result(new Result()) +{ +} + +void ModFolderLoadTask::run() +{ + m_dir.refresh(); + for (auto entry : m_dir.entryInfoList()) + { + Mod m(entry); + m_result->mods[m.mmc_id()] = m; + } + emit succeeded(); +} -- cgit v1.2.3