Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e2fc5c4f authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1String

parent 42ab90e2
......@@ -306,9 +306,9 @@ void ArchiveDialog::slotUser1()
}
// Force filename to be ending with vCalendar extension
QString filename = destUrl.fileName();
if (!filename.endsWith(QStringLiteral(".vcs"))
&& !filename.endsWith(QStringLiteral(".ics"))) {
filename.append(QStringLiteral(".ics"));
if (!filename.endsWith(QLatin1String(".vcs"))
&& !filename.endsWith(QLatin1String(".ics"))) {
filename.append(QLatin1String(".ics"));
destUrl = destUrl.adjusted(QUrl::RemoveFilename);
destUrl.setPath(destUrl.path() + filename);
}
......
......@@ -50,11 +50,11 @@ void TextBrowser::setSource(const QUrl &name)
QString uri = name.toString();
// QTextBrowser for some reason insists on putting // or / in links,
// this is a crude workaround
if (uri.startsWith(QStringLiteral("uid:"))
|| uri.startsWith(QStringLiteral("kmail:"))
if (uri.startsWith(QLatin1String("uid:"))
|| uri.startsWith(QLatin1String("kmail:"))
|| uri.startsWith(QStringLiteral("urn:x-ical").section(QLatin1Char(':'), 0, 0))
|| uri.startsWith(QStringLiteral("news:"))
|| uri.startsWith(QStringLiteral("mailto:"))) {
|| uri.startsWith(QLatin1String("news:"))
|| uri.startsWith(QLatin1String("mailto:"))) {
uri.replace(QRegExp(QLatin1String("^([^:]+:)/+")), QStringLiteral("\\1"));
}
......
......@@ -535,25 +535,25 @@ QString CalendarSupport::displayName(Akonadi::ETMCalendar *calendar, const Akona
while (p != Akonadi::Collection::root()) {
Akonadi::Collection tCol = calendar->collection(p.id());
const QString tName = tCol.name();
if (tName.startsWith(QStringLiteral("shared.cal"), Qt::CaseInsensitive)) {
if (tName.startsWith(QLatin1String("shared.cal"), Qt::CaseInsensitive)) {
ownerStr = QStringLiteral("Shared");
nameStr = cName;
typeStr = i18n("Calendar");
break;
} else if (tName.startsWith(QStringLiteral("shared.tasks"), Qt::CaseInsensitive)
|| tName.startsWith(QStringLiteral("shared.todo"),
} else if (tName.startsWith(QLatin1String("shared.tasks"), Qt::CaseInsensitive)
|| tName.startsWith(QLatin1String("shared.todo"),
Qt::CaseInsensitive)) {
ownerStr = QStringLiteral("Shared");
nameStr = cName;
typeStr = i18n("Tasks");
break;
} else if (tName.startsWith(QStringLiteral("shared.journal"),
} else if (tName.startsWith(QLatin1String("shared.journal"),
Qt::CaseInsensitive)) {
ownerStr = QStringLiteral("Shared");
nameStr = cName;
typeStr = i18n("Journal");
break;
} else if (tName.startsWith(QStringLiteral("shared.notes"), Qt::CaseInsensitive)) {
} else if (tName.startsWith(QLatin1String("shared.notes"), Qt::CaseInsensitive)) {
ownerStr = QStringLiteral("Shared");
nameStr = cName;
typeStr = i18n("Notes");
......@@ -651,7 +651,7 @@ QString CalendarSupport::displayName(Akonadi::ETMCalendar *calendar, const Akona
const QString dName = fullCollection.displayName();
if (!dName.isEmpty()) {
return fullCollection.name().startsWith(QStringLiteral("akonadi_")) ? i18n("My %1",
return fullCollection.name().startsWith(QLatin1String("akonadi_")) ? i18n("My %1",
dName) : dName;
} else if (!fullCollection.name().isEmpty()) {
return fullCollection.name();
......
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