diff options
| author | saturneric <[email protected]> | 2026-10-24 11:00:29 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-10-24 11:00:29 +0200 |
| commit | acd8cfc36bc2ddb9584f8a27b364f43e5cc24af3 (patch) | |
| tree | ab1936b700b9156d9dce89a0ce67c9f9239ed953 /src/m_im/ImToken.cpp | |
| parent | refactor(email): use Qt string literal operators (diff) | |
| download | modules-acd8cfc36bc2ddb9584f8a27b364f43e5cc24af3.tar.gz modules-acd8cfc36bc2ddb9584f8a27b364f43e5cc24af3.zip | |
refactor: use Qt string literal operators in modules
- replace QStringLiteral with u""_s and QLatin1String with ""_L1 in the
im, key server sync, pgp inspect and version check modules
- spell non-literal Latin-1 views as QLatin1StringView
- import Qt::StringLiterals per file, as modules have no host PCH
Diffstat (limited to 'src/m_im/ImToken.cpp')
| -rw-r--r-- | src/m_im/ImToken.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/m_im/ImToken.cpp b/src/m_im/ImToken.cpp index 031a286..5b5fa24 100644 --- a/src/m_im/ImToken.cpp +++ b/src/m_im/ImToken.cpp @@ -41,6 +41,8 @@ #include <cstring> #include <string_view> +using namespace Qt::StringLiterals; + // The token format, moved out of the Host's core unchanged: the wire is a // contract between every copy of GpgFrontend, so not one byte of what Encode() // writes or Decode() accepts may differ from what the core used to do. The @@ -588,7 +590,7 @@ auto BuildPermutation(const QByteArray& material, int m) -> QList<int> { // What it does buy us is local: ordinary text now stops at its first space or // punctuation mark instead of reaching the O(n^2) decoder and the 128 MiB KDF. auto Normalize(const QString& text, QString& compact) -> bool { - if (text.contains(QLatin1String("-----BEGIN PGP"))) return false; + if (text.contains("-----BEGIN PGP"_L1)) return false; compact.clear(); compact.reserve(std::min<qsizetype>(text.size(), kMaxTokenChars)); |
