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 8acc15b7 authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1String

parent 6b23a7d3
......@@ -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;
}
......
......@@ -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 {
......
......@@ -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));
}
......
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