summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/mod/ModFolderLoadTask.cpp
blob: 883498771be87adc17050cf210180d45882db5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "ModFolderLoadTask.h"
#include <QDebug>

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