Skip to content

Commit

Permalink
[nemo-qml-plugin-calendar] Don't assume that rawEvents list filter ou…
Browse files Browse the repository at this point in the history
…t events on visibility.
  • Loading branch information
dcaliste committed Nov 24, 2020
1 parent c850001 commit 3a56f08
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/calendarworker.cpp
Expand Up @@ -744,16 +744,18 @@ void CalendarWorker::loadData(const QList<CalendarData::Range> &ranges,
// Load all recurring incidences, we have no other way to detect if they occur within a range
mStorage->loadRecurringIncidences();

KCalCore::Event::List list = mCalendar->rawEvents();

if (reset)
mSentEvents.clear();

QMultiHash<QString, CalendarData::Event> events;
QMultiHash<QString, KDateTime> allDay;
bool orphansDeleted = false;

foreach (const KCalCore::Event::Ptr e, list) {
const KCalCore::Event::List list = mCalendar->rawEvents();
for (const KCalCore::Event::Ptr e : list) {
if (!mCalendar->isVisible(e)) {
continue;
}
// The database may have changed after loading the events, make sure that the notebook
// of the event still exists.
mKCal::Notebook::Ptr notebook = mStorage->notebook(mCalendar->notebook(e));
Expand Down

0 comments on commit 3a56f08

Please sign in to comment.