Commit 04bd6a7b authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1String

parent ae061da1
......@@ -62,7 +62,7 @@ void SelectMatchTypeComboBox::initialize()
QString SelectMatchTypeComboBox::code(bool &negative) const
{
QString value = itemData(currentIndex()).toString();
negative = value.startsWith(QStringLiteral("[NOT]"));
negative = value.startsWith(QLatin1String("[NOT]"));
if (negative) {
value = value.remove(QStringLiteral("[NOT]"));
}
......
......@@ -39,7 +39,7 @@ void SelectComparatorComboBox::initialize(const QStringList &sieveCapabilities)
addItem(QStringLiteral("i;ascii-casemap"), QStringLiteral("comparator-i;ascii-casemap"));
for (const QString &capability : sieveCapabilities) {
if (capability.startsWith(QStringLiteral("comparator-"))) {
if (capability.startsWith(QLatin1String("comparator-"))) {
QString str(capability);
str.remove(QStringLiteral("comparator-"));
addItem(str, capability);
......
......@@ -171,7 +171,7 @@ static inline bool is8Bit(signed char ch)
static QString removeCRLF(const QString &s)
{
const bool CRLF = s.endsWith(QStringLiteral("\r\n"));
const bool CRLF = s.endsWith(QLatin1String("\r\n"));
const bool LF = !CRLF && s.endsWith(QLatin1Char('\n'));
const int e = CRLF ? 2 : LF ? 1 : 0; // what to chop off at the end
......@@ -181,7 +181,7 @@ static QString removeCRLF(const QString &s)
static QString removeDotStuff(const QString &s)
{
return s.startsWith(QStringLiteral("..")) ? s.mid(1) : s;
return s.startsWith(QLatin1String("..")) ? s.mid(1) : s;
}
namespace KSieve {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment