aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-03 20:13:37 +0100
committerLaurent Montel <[email protected]>2018-02-03 20:13:47 +0100
commite2fc5c4f17afe2d45ef23f01507c1eb6400f1e58 (patch)
treed6efb4274f30870112763a4e20ee245cd74104f2
parent42ab90e2d6fcff75639ca4ecef64e9e1e6a54a08 (diff)
Use QLatin1String
-rw-r--r--src/archivedialog.cpp6
-rw-r--r--src/next/incidenceviewer.cpp8
-rw-r--r--src/utils.cpp12
3 files changed, 13 insertions, 13 deletions
diff --git a/src/archivedialog.cpp b/src/archivedialog.cpp
index 3a6e963..ecc68bb 100644
--- a/src/archivedialog.cpp
+++ b/src/archivedialog.cpp
@@ -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);
}
diff --git a/src/next/incidenceviewer.cpp b/src/next/incidenceviewer.cpp
index fc21822..5203c54 100644
--- a/src/next/incidenceviewer.cpp
+++ b/src/next/incidenceviewer.cpp
@@ -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"));
}
diff --git a/src/utils.cpp b/src/utils.cpp
index 72624e2..3f82533 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -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();