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

Method buildHashTask

launcher/ui/dialogs/BlockedModsDialog.cpp:269–279  ·  view source on GitHub ↗

@brief add a hashing task for the file located at path and connect it to check that hash against our blocked mods list @param path the path to the local file being hashed

Source from the content-addressed store, hash-verified

267/// our blocked mods list
268/// @param path the path to the local file being hashed
269void BlockedModsDialog::buildHashTask(QString path)
270{
271 auto hash_task = Hashing::createHasher(path, m_hash_type);
272
273 qDebug() << "[Blocked Mods Dialog] Creating Hash task for path: " << path;
274
275 connect(hash_task.get(), &Task::succeeded, this, [this, hash_task, path] { checkMatchHash(hash_task->getResult(), path); });
276 connect(hash_task.get(), &Task::failed, this, [path] { qDebug() << "Failed to hash path: " << path; });
277
278 m_hashing_task->addTask(hash_task);
279}
280
281/// @brief check if the computed hash for the provided path matches a blocked
282/// mod we are looking for

Callers

nothing calls this directly

Calls 4

createHasherFunction · 0.85
addTaskMethod · 0.80
getMethod · 0.45
getResultMethod · 0.45

Tested by

no test coverage detected