summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-25 08:02:12 +0100
committerLaurent Montel <[email protected]>2018-01-25 08:02:12 +0100
commit91d542375749fad71433b01d91ed095301f677ad (patch)
tree96633ad1a21f1ffe412b8e2c34025531a9cf14d5
parentbe5c1b6829748373ba082a3df9b6da88fbec2a7d (diff)
Use QLAtin1String
-rw-r--r--src/filter/mailfilter.cpp10
-rw-r--r--src/folder/accountconfigorderdialog.cpp6
-rw-r--r--src/search/searchrule/searchrule.cpp26
-rw-r--r--src/util/mailutil.cpp8
4 files changed, 25 insertions, 25 deletions
diff --git a/src/filter/mailfilter.cpp b/src/filter/mailfilter.cpp
index afc4e18..db76b61 100644
--- a/src/filter/mailfilter.cpp
+++ b/src/filter/mailfilter.cpp
@@ -418,11 +418,11 @@ bool MailFilter::readConfig(const KConfigGroup &config, bool interactive)
bApplyOnAllFolders = false;
mApplicability = ButImap;
} else {
- bApplyBeforeOutbound = bool(sets.contains(QStringLiteral("before-send-mail")));
- bApplyOnInbound = bool(sets.contains(QStringLiteral("check-mail")));
- bApplyOnOutbound = bool(sets.contains(QStringLiteral("send-mail")));
- bApplyOnExplicit = bool(sets.contains(QStringLiteral("manual-filtering")));
- bApplyOnAllFolders = bool(sets.contains(QStringLiteral("all-folders")));
+ bApplyBeforeOutbound = bool(sets.contains(QLatin1String("before-send-mail")));
+ bApplyOnInbound = bool(sets.contains(QLatin1String("check-mail")));
+ bApplyOnOutbound = bool(sets.contains(QLatin1String("send-mail")));
+ bApplyOnExplicit = bool(sets.contains(QLatin1String("manual-filtering")));
+ bApplyOnAllFolders = bool(sets.contains(QLatin1String("all-folders")));
mApplicability = (AccountType)config.readEntry(
"Applicability", (int)ButImap);
}
diff --git a/src/folder/accountconfigorderdialog.cpp b/src/folder/accountconfigorderdialog.cpp
index d131cbd..f741aeb 100644
--- a/src/folder/accountconfigorderdialog.cpp
+++ b/src/folder/accountconfigorderdialog.cpp
@@ -196,9 +196,9 @@ void AccountConfigOrderDialog::init()
for (const Akonadi::AgentInstance &instance : lstInstances) {
const QStringList capabilities(instance.type().capabilities());
if (instance.type().mimeTypes().contains(KMime::Message::mimeType())) {
- if (capabilities.contains(QStringLiteral("Resource"))
- && !capabilities.contains(QStringLiteral("Virtual"))
- && !capabilities.contains(QStringLiteral("MailTransport"))) {
+ if (capabilities.contains(QLatin1String("Resource"))
+ && !capabilities.contains(QLatin1String("Virtual"))
+ && !capabilities.contains(QLatin1String("MailTransport"))) {
const QString identifier = instance.identifier();
if (!identifier.contains(POP3_RESOURCE_IDENTIFIER)) {
instanceList << instance.identifier();
diff --git a/src/search/searchrule/searchrule.cpp b/src/search/searchrule/searchrule.cpp
index aa0843c..9f509db 100644
--- a/src/search/searchrule/searchrule.cpp
+++ b/src/search/searchrule/searchrule.cpp
@@ -321,7 +321,7 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
//TODO ?
code += i18n("<message> not implemented/supported");
} else if (mField == "<body>") {
- if (!requires.contains(QStringLiteral("body"))) {
+ if (!requires.contains(QLatin1String("body"))) {
requires << QStringLiteral("body");
}
QString comparaison;
@@ -345,12 +345,12 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncRegExp:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
break;
case FuncNotRegExp:
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -358,14 +358,14 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncStartWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
contentStr = QLatin1Char('^') + contentStr;
break;
case FuncNotStartWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -374,7 +374,7 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncEndWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -382,7 +382,7 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncNotEndWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -425,12 +425,12 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncRegExp:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
break;
case FuncNotRegExp:
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -438,14 +438,14 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncStartWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
contentStr = QLatin1Char('^') + contentStr;
break;
case FuncNotStartWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -454,7 +454,7 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncEndWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
@@ -462,7 +462,7 @@ void SearchRule::generateSieveScript(QStringList &requires, QString &code)
break;
case FuncNotEndWith:
comparaison = QStringLiteral(":regex");
- if (!requires.contains(QStringLiteral("regex"))) {
+ if (!requires.contains(QLatin1String("regex"))) {
requires << QStringLiteral("regex");
}
comparaison = QStringLiteral(":regex");
diff --git a/src/util/mailutil.cpp b/src/util/mailutil.cpp
index fc303e7..c98eb25 100644
--- a/src/util/mailutil.cpp
+++ b/src/util/mailutil.cpp
@@ -97,7 +97,7 @@ bool MailCommon::Util::isVirtualCollection(const QString &resource)
}
const auto type = Akonadi::AgentManager::self()->type(resource);
- return type.capabilities().contains(QStringLiteral("Virtual"));
+ return type.capabilities().contains(QLatin1String("Virtual"));
}
bool MailCommon::Util::isLocalCollection(const QString &resource)
@@ -155,9 +155,9 @@ Akonadi::AgentInstance::List MailCommon::Util::agentInstances(bool excludeMailDi
for (const Akonadi::AgentInstance &instance : agentList) {
const QStringList capabilities(instance.type().capabilities());
if (instance.type().mimeTypes().contains(KMime::Message::mimeType())) {
- if (capabilities.contains(QStringLiteral("Resource"))
- && !capabilities.contains(QStringLiteral("Virtual"))
- && !capabilities.contains(QStringLiteral("MailTransport"))) {
+ if (capabilities.contains(QLatin1String("Resource"))
+ && !capabilities.contains(QLatin1String("Virtual"))
+ && !capabilities.contains(QLatin1String("MailTransport"))) {
relevantInstances << instance;
} else if (!excludeMailDispacher
&& instance.identifier() == QLatin1String("akonadi_maildispatcher_agent")) {