@brief check if the computed hash for the provided path matches a blocked mod we are looking for @param hash the computed hash for the provided path @param path the path to the local file being compared
| 283 | /// @param hash the computed hash for the provided path |
| 284 | /// @param path the path to the local file being compared |
| 285 | void BlockedModsDialog::checkMatchHash(QString hash, QString path) |
| 286 | { |
| 287 | bool match = false; |
| 288 | |
| 289 | qDebug() << "[Blocked Mods Dialog] Checking for match on hash: " << hash << "| From path:" << path; |
| 290 | |
| 291 | for (auto& mod : m_mods) { |
| 292 | if (mod.matched) { |
| 293 | continue; |
| 294 | } |
| 295 | if (mod.hash.compare(hash, Qt::CaseInsensitive) == 0) { |
| 296 | mod.matched = true; |
| 297 | mod.localPath = path; |
| 298 | match = true; |
| 299 | |
| 300 | qDebug() << "[Blocked Mods Dialog] Hash match found:" << mod.name << hash << "| From path:" << path; |
| 301 | |
| 302 | break; |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | if (match) { |
| 307 | update(); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | /// @brief Check if the name of the file at path matches the name of a blocked mod we are searching for |
| 312 | /// @param path the path to check |