* @brief Computes a stable 16-char SHA-1 prefix identifying a shortcut path. */
| 393 | * @brief Computes a stable 16-char SHA-1 prefix identifying a shortcut path. |
| 394 | */ |
| 395 | QString shortcutIdentityHash(const QString& shortcutPath) |
| 396 | { |
| 397 | if (shortcutPath.isEmpty()) |
| 398 | return QString(); |
| 399 | |
| 400 | const QByteArray digest = |
| 401 | QCryptographicHash::hash(shortcutPath.toUtf8(), QCryptographicHash::Sha1); |
| 402 | return QString::fromLatin1(digest.toHex().left(16)); |
| 403 | } |
| 404 | |
| 405 | // code-verify off (cold argv setup before QApplication exists; C malloc is intentional) |
| 406 | /** |
no test coverage detected