Commit 7f340288 authored by Allen Winter's avatar Allen Winter
Browse files

akonadicollectionview.cpp - append "Default Calendar" to name

In the collectionview, if a collection contains the default
calendar print "FOO (Default Calendar)" instead of "FOO"

Differential Revision: https://phabricator.kde.org/D27796
parent 3af2004b
......@@ -304,6 +304,13 @@ public:
}
return font;
}
} else if (role == Qt::DisplayRole) {
const Akonadi::Collection collection = CalendarSupport::collectionFromIndex(index);
const Akonadi::Collection::Id colId = collection.id();
if (colId == CalendarSupport::KCalPrefs::instance()->defaultCalendarId()) {
return i18nc("this is the default calendar", "%1 (Default Calendar)", collection.displayName());
}
}
return QSortFilterProxyModel::data(index, role);
......
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