Commit c80e387b authored by Allen Winter's avatar Allen Winter
Browse files

calendarview.cpp - defaultCollection() axe lastselected folder

lastselectedfolder config from incidenceeditor is going away
parent 37dcca22
...@@ -2638,17 +2638,7 @@ Akonadi::Collection CalendarView::defaultCollection(const QLatin1String &mimeTyp ...@@ -2638,17 +2638,7 @@ Akonadi::Collection CalendarView::defaultCollection(const QLatin1String &mimeTyp
return collection; return collection;
} }
// 3. Try last selected folder // 3. Try the selected collection
collection
= mCalendar->collection(IncidenceEditorNG::IncidenceEditorSettings::self()->lastSelectedFolder());
supportsMimeType
= collection.contentMimeTypes().contains(mimeType) || mimeType == QLatin1String("");
hasRights = collection.rights() & Akonadi::Collection::CanCreateItem;
if (collection.isValid() && supportsMimeType && hasRights) {
return collection;
}
// 4. Try the selected collection
collection = selectedCollection(); collection = selectedCollection();
supportsMimeType supportsMimeType
= collection.contentMimeTypes().contains(mimeType) || mimeType == QLatin1String(""); = collection.contentMimeTypes().contains(mimeType) || mimeType == QLatin1String("");
...@@ -2657,7 +2647,7 @@ Akonadi::Collection CalendarView::defaultCollection(const QLatin1String &mimeTyp ...@@ -2657,7 +2647,7 @@ Akonadi::Collection CalendarView::defaultCollection(const QLatin1String &mimeTyp
return collection; return collection;
} }
// 5. Try the checked collections // 4. Try the checked collections
const Akonadi::Collection::List collections = checkedCollections(); const Akonadi::Collection::List collections = checkedCollections();
for (const Akonadi::Collection &checkedCollection : collections) { for (const Akonadi::Collection &checkedCollection : collections) {
supportsMimeType supportsMimeType
......
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