Commit c440f03b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent c98d7a5c
......@@ -80,13 +80,13 @@ void ContactHandler::setupCollection(Collection &collection, const ContactsGroup
QString realName = group->title();
if (group->isSystemGroup()) {
if (group->title().contains(QLatin1String("Coworkers"))) {
if (realName.contains(QLatin1String("Coworkers"))) {
realName = i18nc("Name of a group of contacts", "Coworkers");
} else if (group->title().contains(QLatin1String("Friends"))) {
} else if (realName.contains(QLatin1String("Friends"))) {
realName = i18nc("Name of a group of contacts", "Friends");
} else if (group->title().contains(QLatin1String("Family"))) {
} else if (realName.contains(QLatin1String("Family"))) {
realName = i18nc("Name of a group of contacts", "Family");
} else if (group->title().contains(QLatin1String("My Contacts"))) {
} else if (realName.contains(QLatin1String("My Contacts"))) {
realName = i18nc("Name of a group of contacts", "My Contacts");
}
}
......
......@@ -51,13 +51,14 @@ void DefaultReminderAttribute::deserialize(const QByteArray &data)
const QVariant var = json.toVariant();
const QVariantList list = var.toList();
for (const QVariant &l : list) {
QVariantMap reminder = l.toMap();
const QVariantMap reminder = l.toMap();
KGAPI2::ReminderPtr rem(new KGAPI2::Reminder);
if (reminder[QStringLiteral("type")].toString() == QLatin1String("display")) {
const QString reminderType = reminder[QStringLiteral("type")].toString();
if (reminderType == QLatin1String("display")) {
rem->setType(KCalendarCore::Alarm::Display);
} else if (reminder[QStringLiteral("type")].toString() == QLatin1String("email")) {
} else if (reminderType == QLatin1String("email")) {
rem->setType(KCalendarCore::Alarm::Email);
}
......
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