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

incidencedialog.cpp - default collection for initial calendar

forget about using the last selected calendar and always start
a new incidence with the default calendar.

this gives us consistent behavior and reduces the chances of
creating incidences in the wrong calendar.

CCBUG: 369570

Differential Revision:
parent 729c12d2
......@@ -182,8 +182,8 @@ IncidenceDialogPrivate::IncidenceDialogPrivate(Akonadi::IncidenceChanger *change
mIeResource = new IncidenceResource(mIeAttendee, mIeDateTime, mUi);
// Select calendar to last collection used, if valid; else select the default collection
const qint64 colId = IncidenceEditorNG::IncidenceEditorSettings::self()->lastSelectedFolder();
// Set the default collection
const qint64 colId = CalendarSupport::KCalPrefs::instance()->defaultCalendarId();
const Akonadi::Collection col(colId);
......@@ -226,15 +226,7 @@ void IncidenceDialogPrivate::setCalendarCollection(const Akonadi::Collection &co
if (collection.isValid()) {
} else {
// fallback to default collection
const qint64 defColId = CalendarSupport::KCalPrefs::instance()->defaultCalendarId();
const Akonadi::Collection defCol(defColId);
if (defCol.isValid()) {
} else {
// Give up and use the first item in the selector
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