Commit 8b9852af authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QLatin1String overload for QString::operator ==/!=

parent bdd4624f
......@@ -1593,16 +1593,16 @@ QString KADateTime::toString(const QString &format) const
case 'P': { // am/pm
bool am = (d->time().hour() < 12);
QString text = am ? locale.amText() : locale.pmText();
if (text == QStringLiteral("a.m.")) text = QStringLiteral("am");
else if (text == QStringLiteral("p.m.")) text = QStringLiteral("pm");
if (text == QLatin1String("a.m.")) text = QStringLiteral("am");
else if (text == QLatin1String("p.m.")) text = QStringLiteral("pm");
result += text.toLower();
break;
}
case 'p': { // AM/PM
bool am = (d->time().hour() < 12);
QString text = am ? locale.amText() : locale.pmText();
if (text == QStringLiteral("a.m.")) text = QStringLiteral("am");
else if (text == QStringLiteral("p.m.")) text = QStringLiteral("pm");
if (text == QLatin1String("a.m.")) text = QStringLiteral("am");
else if (text == QLatin1String("p.m.")) text = QStringLiteral("pm");
result += text.toUpper();
break;
}
......
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