~zsombi/ubuntu-ui-toolkit/mainview-bloop

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp

  • Committer: Zsombor Egri
  • Date: 2014-03-10 10:42:42 UTC
  • mfrom: (933.1.35 ubuntu-ui-toolkit)
  • Revision ID: zsombor.egri@canonical.com-20140310104242-u4cnc90n8i4gee7z
trunk merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
410
410
    QOrganizerItemFetchRequest *operation = new QOrganizerItemFetchRequest(q_ptr);
411
411
    operation->setManager(owner->manager);
412
412
 
 
413
    // FIXME: Since returning all events without a limit of date is not a good solution we need to find
 
414
    // a better solution for that.
 
415
    // The current solution filters only the next 7 days (one week).
 
416
    // This will be enough for now, since the current alarms occur weekly, but for the future
 
417
    // we want to allow create alarms with monthly or yearly recurrence
 
418
    QDate currentDate = QDate::currentDate();
 
419
    QDateTime startDate(currentDate,
 
420
                        QTime(0,0,0));
 
421
    QDateTime endDate(currentDate.addDays(7),
 
422
                      QTime(23,59,59));
 
423
    operation->setStartDate(startDate);
 
424
    operation->setEndDate(endDate);
 
425
 
413
426
    // set sort order
414
427
    QOrganizerItemSortOrder sortOrder;
415
428
    sortOrder.setDirection(Qt::AscendingOrder);