summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-06 07:42:28 +0100
committerLaurent Montel <[email protected]>2018-02-06 07:42:28 +0100
commit8acc15b7c68ccf62ded83110fc2a1515bd454e28 (patch)
tree2fdd472789f65a893227d1ea43502ee537a0a5f3
parent6b23a7d31741edc57928068766a551b1ed9f058e (diff)
Use QLatin1String
-rw-r--r--src/agenda/agendaitem.cpp2
-rw-r--r--src/todo/todomodel.cpp2
-rw-r--r--src/whatsnext/whatsnextview.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/agenda/agendaitem.cpp b/src/agenda/agendaitem.cpp
index 0864090..9cb5449 100644
--- a/src/agenda/agendaitem.cpp
+++ b/src/agenda/agendaitem.cpp
@@ -668,7 +668,7 @@ void AgendaItem::dropEvent(QDropEvent *e)
bool decoded = md->hasText();
QString text = md->text();
- if (decoded && text.startsWith(QStringLiteral("file:"))) {
+ if (decoded && text.startsWith(QLatin1String("file:"))) {
mIncidence->addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(text)));
return;
}
diff --git a/src/todo/todomodel.cpp b/src/todo/todomodel.cpp
index e0be6ec..fc2974e 100644
--- a/src/todo/todomodel.cpp
+++ b/src/todo/todomodel.cpp
@@ -771,7 +771,7 @@ bool TodoModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r
KCalCore::Todo::Ptr oldTodo = KCalCore::Todo::Ptr(destTodo->clone());
- if (text.startsWith(QStringLiteral("file:"))) {
+ if (text.startsWith(QLatin1String("file:"))) {
destTodo->addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(
text)));
} else {
diff --git a/src/whatsnext/whatsnextview.cpp b/src/whatsnext/whatsnextview.cpp
index dce6b1c..aa4ee69 100644
--- a/src/whatsnext/whatsnextview.cpp
+++ b/src/whatsnext/whatsnextview.cpp
@@ -39,9 +39,9 @@ using namespace EventViews;
void WhatsNextTextBrowser::setSource(const QUrl &name)
{
QString uri = name.toString();
- if (uri.startsWith(QStringLiteral("event:"))) {
+ if (uri.startsWith(QLatin1String("event:"))) {
Q_EMIT showIncidence(uri);
- } else if (uri.startsWith(QStringLiteral("todo:"))) {
+ } else if (uri.startsWith(QLatin1String("todo:"))) {
Q_EMIT showIncidence(uri);
} else {
QTextBrowser::setSource(QUrl(uri));
@@ -339,9 +339,9 @@ void WhatsNextView::showIncidence(const QString &uid)
return;
}
- if (uid.startsWith(QStringLiteral("event:"))) {
+ if (uid.startsWith(QLatin1String("event:"))) {
item = cal->item(uid.mid(6));
- } else if (uid.startsWith(QStringLiteral("todo:"))) {
+ } else if (uid.startsWith(QLatin1String("todo:"))) {
item = cal->item(uid.mid(5));
}