MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / executeTask

Method executeTask

launcher/modplatform/helpers/HashUtils.cpp:138–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void Hasher::executeTask()
139{
140 m_future = QtConcurrent::run(
141 QThreadPool::globalInstance(), [](QString fileName, Algorithm type) { return hash(fileName, type); }, m_path, m_alg);
142 connect(&m_watcher, &QFutureWatcher<QString>::finished, this, [this] {
143 if (m_future.isCanceled()) {
144 emitAborted();
145 } else if (m_result = m_future.result(); m_result.isEmpty()) {
146 emitFailed("Empty hash!");
147 } else {
148 emitSucceeded();
149 emit resultsReady(m_result);
150 }
151 });
152 m_watcher.setFuture(m_future);
153}
154
155bool Hasher::abort()
156{

Callers

nothing calls this directly

Calls 4

runFunction · 0.85
hashFunction · 0.70
resultMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected