aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_email/test/EMailViewLayoutTest.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-10-24 11:00:29 +0200
committersaturneric <[email protected]>2026-10-24 11:00:29 +0200
commit461ff35f26769c6ce2579dbfc89fa4209955e4d9 (patch)
tree968f8d6439afc9f54d9ca442530a353b4ca6a1a5 /src/m_email/test/EMailViewLayoutTest.cpp
parentrefactor: remove Qt5 leftovers from modules (diff)
downloadmodules-461ff35f26769c6ce2579dbfc89fa4209955e4d9.tar.gz
modules-461ff35f26769c6ce2579dbfc89fa4209955e4d9.zip
refactor(email): use Qt string literal operators
- replace QStringLiteral with u""_s and QLatin1String with ""_L1 - import Qt::StringLiterals per file, as modules have no host PCH
Diffstat (limited to 'src/m_email/test/EMailViewLayoutTest.cpp')
-rw-r--r--src/m_email/test/EMailViewLayoutTest.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/m_email/test/EMailViewLayoutTest.cpp b/src/m_email/test/EMailViewLayoutTest.cpp
index 8e75dc1..e0cd488 100644
--- a/src/m_email/test/EMailViewLayoutTest.cpp
+++ b/src/m_email/test/EMailViewLayoutTest.cpp
@@ -31,6 +31,8 @@
#include "EMailModel.h"
#include "EMailViewLayout.h"
+using namespace Qt::StringLiterals;
+
// The details inspector's rules, checked without a widget. The view itself
// cannot be built in a test here -- these bodies run off the GUI thread -- so
// the decisions it makes are kept in a file that can be.
@@ -265,29 +267,28 @@ TEST(EMailViewLayoutTest, EveryCommandIsReachableInEveryMode) {
TEST(EMailViewLayoutTest, TheSecurityStatusSaysOnlyWhatIsKnown) {
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kENCRYPTED_ONLY, true).text,
- QStringLiteral("Encrypted"));
+ u"Encrypted"_s);
EXPECT_EQ(
EMailSecurityStatus(EMailBadgeState::kSIGNED_UNVERIFIED, false).text,
- QStringLiteral("Signature not checked"));
+ u"Signature not checked"_s);
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kSIGNED_UNVERIFIED, true).text,
- QStringLiteral("Encrypted, signature not checked"));
+ u"Encrypted, signature not checked"_s);
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kSIGNED_GOOD, false).text,
- QStringLiteral("Signature verified"));
+ u"Signature verified"_s);
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kSIGNED_BAD, false).text,
- QStringLiteral("Bad signature"));
+ u"Bad signature"_s);
EXPECT_EQ(
EMailSecurityStatus(EMailBadgeState::kSIGNED_UNAUTHORIZED_KEY, false)
.text,
- QStringLiteral("Signing key not authorized"));
+ u"Signing key not authorized"_s);
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kNOT_PROTECTED, false).text,
- QStringLiteral("Not signed or encrypted"));
+ u"Not signed or encrypted"_s);
// A verdict against the signature never wears the signature's icon.
for (const auto badge :
{EMailBadgeState::kSIGNED_BAD, EMailBadgeState::kSIGNED_ERROR,
EMailBadgeState::kSIGNED_UNAUTHORIZED_KEY,
EMailBadgeState::kSIGNED_MISMATCH, EMailBadgeState::kMALFORMED}) {
- EXPECT_EQ(EMailSecurityStatus(badge, false).icon,
- QStringLiteral(":/icons/warning.png"));
+ EXPECT_EQ(EMailSecurityStatus(badge, false).icon, u":/icons/warning.png"_s);
}
}